19.10.2013, 07:45
[PAWN]
Hello I've started coding in PAWN again when I found out my script had some un fixed errors, to the life of me I don't know how to fix them.
Errors:
Whole code:
Line of error:
Hello I've started coding in PAWN again when I found out my script had some un fixed errors, to the life of me I don't know how to fix them.
Errors:
pawn Код:
Script.pwn(488) : error 028: invalid subscript (not an array or too many subscripts): "NameOfPlayer"
Script.pwn(488) : warning 215: expression has no effect
Script.pwn(488) : error 001: expected token: ";", but found "]"
Script.pwn(488) : error 029: invalid expression, assumed zero
Script.pwn(488) : fatal error 107: too many error messages on one line
pawn Код:
CMD:newbie(playerid, params[])
{
if(Player[playerid][NMute] == 1) return SendErrorMessage(playerid, "You are unable to use /(n)ewbie, reason: muted");
new text[255], string[255];
if(sscanf(params, "s[255]", text)) return SendErrorMessage(playerid, "/(n)ewbie [text]");
for(new p = 0; p < MAX_PLAYERS; p++)
{
if(Player[p][NToggled] != 1 && Player[p][NMute] != 1)
{
format(string, sizeof(string), "%s", NameOfPlayer[playerid]);
SendClientMessage(p, Colour_Newbie_Chat, string);
}
}
return 1;
}
pawn Код:
format(string, sizeof(string), "%s", NameOfPlayer[playerid]);