PDA

View Full Version : Can somebody help with 4 errors?


superaconi
13/06/2013, 10:46 PM
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?

-CaRRoT
13/06/2013, 10:47 PM
You gotta add

new str[128];

at the top of your command or above the format line.

superaconi
13/06/2013, 10:48 PM
You gotta add

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.