Forum

> > CS2D > Scripts > Incorrect code message
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Incorrect code message

23 Antworten
Seite
Zum Anfang Vorherige 1 2 Nächste Zum Anfang

alt Re: Incorrect code message

Quattro
GAME BANNED Off Offline

Zitieren
user Cebra hat geschrieben
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
d = 50
for i = 1, d do
	if player(1,'exists') then
		if player(1,'team')==1 then
			if player(1,'health')>0 then
				if player(1,'health')<50 then
					msg2(1,'this is a nice piece of new generation style code')
				end
			var = 'kids are stupid'
			end 
		parse('restart')
		end
	msg(var)
	end
return
end

@user Quattro:
you missed the do after the for-statement (line 2)

this code will throw an error message, if player 1 is dead and it is executed, because the variable var is unknown.
But why do you use a for-Loop, in this case it is pointless.
please tab your code

@user phalenkO:
you get the error-message because your message wasn't "!kick <id>"
remove the else-statement to avoid this


Thank you for fixing my serious script! You make my life so much easier, now I can create another happy town server with this script!!

alt Re: Incorrect code message

Cebra
User Off Offline

Zitieren
@user Quattro: sorry, didn't get it, but why did you post something, if you are not willing to help. Some people have problems to learn such things, especially in a foreign language

alt Re: Incorrect code message

Quattro
GAME BANNED Off Offline

Zitieren
@user Cebra:
Last time I helped some kid he later copy paste exact script from before and ask to add a variable for him. Also told me he knows how to edit my FKing script and he just needs another var

Give the man a fish and you feed him for a day, teach a man to fish and you feed him for a lifetime.

I suggest you try out the later one some time
Zum Anfang Vorherige 1 2 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht