10.04.2010, 13:35
Hey there. I have a little problem with this command
I added this on top
And I get these errors
Could you help?
Код:
dcmd_goto(playerid, id[]) { new pname[MAX_PLAYER_NAME], file[256], string[256], alvl[256]; GetPlayerName(playerid, pname, sizeof(pname)); format(file, sizeof(string), "\\Users\\%s.ini", pname); if(!logged[playerid]) SendClientMessage(playerid, COLOR_RED, "You are not logged in!"); if(IsPlayerConnected(id)) { alvl = dini_Get(file, "level"); switch(alvl) { case(1): { SendClientMessage(playerid, COLOR_RED, "You have teleported to the ID"); SetPlayerPos(playerid, id); } default: { SendClientMessage(playerid, COLOR_RED, "You are not allowed to use this command!"); } return 1; } } else SendClientMessage(playerid, COLOR_RED, "That player is not connected!"); return 1; }
Код:
new id[MAX_PLAYERS];
Код:
gamemodes\registerorlogin.pwn(155) : warning 219: local variable "id" shadows a variable at a preceding level gamemodes\registerorlogin.pwn(161) : error 035: argument type mismatch (argument 1) gamemodes\registerorlogin.pwn(164) : error 033: array must be indexed (variable "-unknown-") gamemodes\registerorlogin.pwn(169) : error 035: argument type mismatch (argument 2) gamemodes\registerorlogin.pwn(175) : error 002: only a single statement (or expression) can follow each "case" gamemodes\registerorlogin.pwn(175) : warning 215: expression has no effect gamemodes\registerorlogin.pwn(157) : warning 204: symbol is assigned a value that is never used: "string" gamemodes\registerorlogin.pwn(157 -- 178) : error 010: invalid function or declaration gamemodes\registerorlogin.pwn(157 -- 179) : error 010: invalid function or declaration gamemodes\registerorlogin.pwn(157 -- 179) : fatal error 107: too many error messages on one line