05.05.2014, 17:02
Hola,tengo varios errores en una linea al crear un comando ZCMD /adminduty.
C:\Users\Cristian\Desktop\Zafiro City ES\gamemodes\ZFCY.pwn(4649) : error 028: invalid subscript (not an array or too many subscripts): "Info"
C:\Users\Cristian\Desktop\Zafiro City ES\gamemodes\ZFCY.pwn(4649) : warning 215: expression has no effect
C:\Users\Cristian\Desktop\Zafiro City ES\gamemodes\ZFCY.pwn(4649) : error 001: expected token: ";", but found "]"
C:\Users\Cristian\Desktop\Zafiro City ES\gamemodes\ZFCY.pwn(4649) : error 029: invalid expression, assumed zero
C:\Users\Cristian\Desktop\Zafiro City ES\gamemodes\ZFCY.pwn(4649) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Si lo solucionan expliquen como para aprender .
C:\Users\Cristian\Desktop\Zafiro City ES\gamemodes\ZFCY.pwn(4649) : error 028: invalid subscript (not an array or too many subscripts): "Info"
C:\Users\Cristian\Desktop\Zafiro City ES\gamemodes\ZFCY.pwn(4649) : warning 215: expression has no effect
C:\Users\Cristian\Desktop\Zafiro City ES\gamemodes\ZFCY.pwn(4649) : error 001: expected token: ";", but found "]"
C:\Users\Cristian\Desktop\Zafiro City ES\gamemodes\ZFCY.pwn(4649) : error 029: invalid expression, assumed zero
C:\Users\Cristian\Desktop\Zafiro City ES\gamemodes\ZFCY.pwn(4649) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Код:
zcmd(adminduty, playerid, params[]){ if(Info [playerid][pAdminZF]) < 2) return SendClientMessageEx(playerid, COLOR_GRAD2, "[ERROR]: No tienes autorizaciуn a usar este comando.")); new string[200]; if(AdminDuty[playerid] == 0){ AntiAbusos[playerid] = 1;//Cuando la variable esta en 1 dejara usar los comandos AdminDuty[playerid] = 1; HidePM[playerid] = 0; SetPlayerSkin(playerid, 217); Info[playerid][pModel] = 217; SetPlayerArmour(playerid, 999); SetHP(playerid, 999); SetPlayerColor(playerid, ROJO_ADMIN); format(string, sizeof(string), "{0D56E7}[STAFF] >> {FFFFFF}El administrador(a) {3FFFFF}%s {ffffff}estб en servicio para responder dudas & reportes {3FFFFF}(/mp %d).", GetPlayerNameEx(playerid), playerid); ABroadCast(0xFFFFFFFF,string,4); ShowPlayerDialog(playerid, INVALID_DIALOG, DIALOG_STYLE_MSGBOX, "{0B44FE}En servicio", "{FFFFFF}Ahora estas en servicio, por lo que deberбs {FF0411}administrar {FFFFFF}un tiempo determinado.\nRecuerda tener paciencia con los {FF0411}usuarios\n\n {FFFFFF}Usa {FF0411}/adminhelp {FFFFFF}para ver los comandos.", "OK", ""); }