31.03.2009, 17:31
Hello
I got the next thing:
And i get this error:
error 006: must be assigned to an array
Its on line 131 for me
The next:
This was like this:
Playerid i changed to id give someone else an level
But now i want to change the 1 to an variable so you can fill in wich level somei going to be!
BTW: I got the define of dcmd andhe code of sscanf !
PLease help i need this!
Oxside
P.S I use reason because this was orginal the /ban command from the samp wiki!
I got the next thing:
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { dcmd(givelevel, 8, cmdtext); return 0; } dcmd_givelevel(playerid, params[]) { new id, reason[64]; if (sscanf(params, "uz", id, reason)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/givelevel <playerid/partname> <level>\""); else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found"); else { Level[id] = reason; format(reason, sizeof (reason), "You has got an level up!", reason[0] ? (" for: ") : (""), reason); SendClientMessage(id, 0xFF0000AA, reason); SendClientMessage(playerid, 0x00FF00AA, "Level has been given!"); } return 1; }
error 006: must be assigned to an array
Its on line 131 for me
The next:
Код:
Level[id] = reason;
Код:
Level[playerid] = 1;
But now i want to change the 1 to an variable so you can fill in wich level somei going to be!
BTW: I got the define of dcmd andhe code of sscanf !
PLease help i need this!
Oxside
P.S I use reason because this was orginal the /ban command from the samp wiki!