03.10.2010, 13:19
command :
error :
I do not understand, is defined tmp and cmd, what is it?
Код:
CMD:makeadmin(playerid, params[]) { new para1,level,string[256], giveplayer[MAX_PLAYER_NAME],sendername[MAX_PLAYER_NAME],idx; new tmp[256], cmd[256]; if(IsPlayerConnected(playerid)) { if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /makeadmin [playerid/PartOfName] [level(1-3)]"); return 1; } para1 = ReturnUser(tmp); level = strval(tmp); tmp = strtok(params, idx); if (PlayerInfo[playerid][pAdmin] >= 1337) { if(IsPlayerConnected(para1)) { if(para1 != INVALID_PLAYER_ID) { GetPlayerName(para1, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); PlayerInfo[para1][pAdmin] = level; printf("AdmCmd: %s has promoted %s to a level %d admin.", sendername, giveplayer, level); format(string, sizeof(string), " You have been promoted to a level %d admin by %s", level, sendername); SendClientMessage(para1, COLOR_LIGHTBLUE, string); format(string, sizeof(string), " You have promoted %s to a level %d admin.", giveplayer,level); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); } } } else { SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!"); } } return 1; }
Код:
C:\ahasasa\gf.pwn(10741) : warning 204: symbol is assigned a value that is never used: "cmd" C:\ahasasa\gf.pwn(12717) : error 017: undefined symbol "cmd" C:\ahasasa\gf.pwn(12720) : error 017: undefined symbol "cmd" C:\ahasasa\gf.pwn(12724) : error 017: undefined symbol "tmp" C:\ahasasa\gf.pwn(12725) : error 017: undefined symbol "tmp" C:\ahasasa\gf.pwn(12731) : error 017: undefined symbol "tmp" C:\ahasasa\gf.pwn(12732) : error 017: undefined symbol "tmp" C:\ahasasa\gf.pwn(12733) : error 017: undefined symbol "tmp" C:\ahasasa\gf.pwn(12738) : error 017: undefined symbol "tmp" C:\ahasasa\gf.pwn(12803) : error 017: undefined symbol "cmd" C:\ahasasa\gf.pwn(12807) : error 017: undefined symbol "tmp" C:\ahasasa\gf.pwn(12808) : error 017: undefined symbol "tmp" C:\ahasasa\gf.pwn(12818) : error 017: undefined symbol "tmp" C:\ahasasa\gf.pwn(12841) : error 017: undefined symbol "cmd" C:\ahasasa\gf.pwn(12847) : error 017: undefined symbol "tmp" C:\ahasasa\gf.pwn(12848) : error 017: undefined symbol "tmp" C:\ahasasa\gf.pwn(12854) : error 017: undefined symbol "tmp" C:\ahasasa\gf.pwn(12874) : error 017: undefined symbol "cmd" C:\ahasasa\gf.pwn(12880) : error 017: undefined symbol "tmp" C:\ahasasa\gf.pwn(12881) : error 017: undefined symbol "tmp" C:\ahasasa\gf.pwn(12887) : error 017: undefined symbol "tmp" C:\ahasasa\gf.pwn(12911) : error 017: undefined symbol "cmd" C:\ahasasa\gf.pwn(12919) : error 017: undefined symbol "tmp" C:\ahasasa\gf.pwn(12920) : error 017: undefined symbol "tmp" C:\ahasasa\gf.pwn(12925) : error 017: undefined symbol "tmp" C:\ahasasa\gf.pwn(12931) : error 017: undefined symbol "tmp" C:\ahasasa\gf.pwn(12932) : error 017: undefined symbol "tmp" Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 26 Errors.