Can somebody help with 4 errors?
#1

I made this command but when i want to compile it i have 4 erros:

Код:
C:\Icons\Samp Fajlovi\Ultra Gaming RP v.1.8\gamemodes\UGRPG.pwn(51721) : error 017: undefined symbol "str"
C:\Icons\Samp Fajlovi\Ultra Gaming RP v.1.8\gamemodes\UGRPG.pwn(51721) : error 017: undefined symbol "str"
C:\Icons\Samp Fajlovi\Ultra Gaming RP v.1.8\gamemodes\UGRPG.pwn(51721) : error 029: invalid expression, assumed zero
C:\Icons\Samp Fajlovi\Ultra Gaming RP v.1.8\gamemodes\UGRPG.pwn(51721) : fatal error 107: too many error messages on one line
This is my command:

Код:
if (strcmp("/givelevel", cmdtext, true) == 0)
    {
        if(PlayerInfo[playerid][pAdmin] >= 1337)
        {
            foreach(Player, i)
            {
				PlayerInfo[i][pLevel] += 1;
			}
	                format(str, sizeof(str), "Admin give level up for all players!");
			SendClientMessageToAll(COLOR_LIGHTBLUE,str);
			return 1;
		}
		else
		{
		    SendClientMessage(playerid, COLOR_ASKQ, "You are not allowed to do that!");
		}
	}
Red line is line 51721 can somebody help me please and to fix all command?
Reply
#2

You gotta add

PHP код:
new str[128]; 
at the top of your command or above the format line.
Reply
#3

Quote:
Originally Posted by -CaRRoT
Посмотреть сообщение
You gotta add

PHP код:
new str[128]; 
at the top of your command or above the format line.
can you tell me about that what that mean?
I'm beginner.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)