05.04.2012, 13:29
The errors:
Lines:
Thanks for the helpers.
Код:
C:\Documents and Settings\Administrator\щемзп дтбегд\ъйчйеъ дозщб\чйгегйн есчшйфийн\-----(423) : error 017: undefined symbol "ID" C:\Documents and Settings\Administrator\щемзп дтбегд\ъйчйеъ дозщб\чйгегйн есчшйфийн\-----(424) : error 017: undefined symbol "levels" C:\Documents and Settings\Administrator\щемзп дтбегд\ъйчйеъ дозщб\чйгегйн есчшйфийн\-----(425) : error 017: undefined symbol "ID" C:\Documents and Settings\Administrator\щемзп дтбегд\ъйчйеъ дозщб\чйгегйн есчшйфийн\-----(425) : error 017: undefined symbol "red" C:\Documents and Settings\Administrator\щемзп дтбегд\ъйчйеъ дозщб\чйгегйн есчшйфийн\------(426) : error 017: undefined symbol "PlayerData" C:\Documents and Settings\Administrator\щемзп дтбегд\ъйчйеъ дозщб\чйгегйн есчшйфийн-----(426) : error 017: undefined symbol "ID" C:\Documents and Settings\Administrator\щемзп дтбегд\ъйчйеъ дозщб\чйгегйн есчшйфийн\-----(426) : error 029: invalid expression, assumed zero C:\Documents and Settings\Administrator\щемзп дтбегд\ъйчйеъ дозщб\чйгегйн есчшйфийн\-----(426) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 8 Errors.
Код:
CMD:setadmin(playerid, params[]) { if(!IsPlayerAdmin(playerid))return 0; if(sscanf(params,"ui",ID,levels)) return SendClientMessage(playerid,0xFF9900AA, "Correct Syntax: /setadmin [ID] [level 1-20]");//it will show this if you dont use the format properly if(levels > 20) return SendClientMessage(playerid,0xFF0000FF,"шоеъ жойреъ: 20");//Available levels if(!IsPlayerConnected(ID))return SendClientMessage(playerid,red,"!дощъощ щвей ае айре озебш");//Detect if the id/partofname is connected if(PlayerData[ID][AdminLevel] == levels) return SendClientMessage(playerid,0xFF0000FF, "!бтйд рецшд, дощъощ дйре лбш бшоъ дже");//Detect if the guy is already the level you setted GetPlayerName(playerid,Nam, MAX_PLAYER_NAME); GetPlayerName(ID,pname,MAX_PLAYER_NAME); if(levels == 0) { format(str, sizeof(str),"%s has set your admin level to %d, enjoy!",Nam,levels); SendClientMessage(ID,0xFF9900AA,str); format(str, sizeof(str),"You have set %s admin level to %d!",pname,levels); SendClientMessage(playerid,0xFF9900AA,str); PlayerData[ID][AdminLevel] = levels; return 1; } format(str, sizeof(str),"%s has set your admin level to %d, enjoy!",Nam,levels); SendClientMessage(ID,0xFF9900AA,str); format(str, sizeof(str),"You have set %s admin level to %d!",pname,levels); SendClientMessage(playerid,0xFF9900AA,str); PlayerData[ID][AdminLevel] = levels; return 1; }