[HELP] Getting crazy...
#1

If you have readed my other topic, I had probpems with the cop radio... I fixed it by adding...

Код:
if(gTeam[playerid] == TEAM_LVPD)
Anyway.. now I have to change some cmds in the script to that TEAM_LVPD, it worked on all cmds, but not this one:

Код:
	if (strcmp("/onduty", cmdtext, true, 7) == 0)
	{
	     if(gTeam[playerid] == TEAM_LVPD)
	     new str[256], pname[256];
		GetPlayerName(playerid, pname, 256);
		format(str, 256, "Officer %s Is now on duty!", pname, cmdtext[7]);
		SendClientMessageToAll(COLOR_BLUE, str);
		return 1;
	}
The errors/warnings I get is:

Код:
declaration of a local variable must appear in a compound block
undefined symbol "str"
expression has no effect
expected token: ";", but found "]"
too many error messages on one line

4 Errors
All errors if from the same line "701" that is:

Код:
new str[256], pname[256];
What is the problem, all this errors/warnings on the same line?!

NOTE: If I delete the full cmd, the errors just moves down to the other cmd /offduty...

Reply


Messages In This Thread
[HELP] Getting crazy... - by FreddeN - 15.06.2009, 13:47
Re: [HELP] Getting crazy... - by bpeterson - 15.06.2009, 14:01
Re: [HELP] Getting crazy... - by FreddeN - 15.06.2009, 14:15
Re: [HELP] Getting crazy... - by FreddeN - 15.06.2009, 14:25

Forum Jump:


Users browsing this thread: 1 Guest(s)