21.05.2014, 02:35
Код:
public OnPlayerUpdate(playerid) { format(String, sizeof(String), "%.0f%", (floatdiv(Exp[playerid], TExp[playerid]) * 100.0)); PlayerTextDrawSetString(playerid, ExpDraw[7], String); format(String, sizeof(String), "%.0f%", (floatdiv(Kills[playerid], 13) * 100.0)); PlayerTextDrawSetString(playerid, ExpDraw[8], String); PlayerTextDrawShow(playerid, ExpDraw[7]); format(String, sizeof(String), "~w~Nivel: ~y~%d", Nivel[playerid]); PlayerTextDrawSetString(playerid, ExpDraw[1], String); PlayerTextDrawShow(playerid, ExpDraw[1]); SetProgressBarValue(ExpBar[playerid][0],(floatdiv(Exp[playerid], TExp[playerid]) * 100.0)); ShowProgressBarForPlayer(playerid, ExpBar[playerid][0]); SetProgressBarValue(ExpBar[playerid][1],(floatdiv(Kills[playerid], 13) * 100.0)); ShowProgressBarForPlayer(playerid, ExpBar[playerid][1]); if(Kills[playerid] == 13) { SendClientMessage(playerid, COLOR_BLUE, "|| INFO || Fizes-te 13 kills e ganhas-te +2EXP !"); Exp[playerid] = Exp[playerid] + 2; Kills[playerid] = 0; } new H, M, S; gettime(H, M, S); if(M == 00 && S == 00) { format(String, sizeof(String), "~b~ Sгo ~r~%d ~b~Horas e ~r~%d ~b~Minutos\n ~r~HORA DO PAYDAY!", H, M); GameTextForAll(String, 1500, 6); if(Online[playerid] != 1) return SendClientMessage(playerid, COLOR_ORANGE, "|| INFO || Nгo recebeste o payday. Razгo: Nгo estбs online б mais de 30minutos."); Exp[playerid]+=7; if(TExp[playerid] == Exp[playerid] || Exp[playerid] > TExp[playerid]) { Nivel[playerid]++; TExp[playerid] = Nivel[playerid]*6; Exp[playerid] = 0; format(String, sizeof(String), "|| INFO || Parabйns, subiste para nivel %d e tens %d/%d de experiкncia", Nivel[playerid], Exp[playerid], TExp[playerid]); SendClientMessage(playerid, COLOR_BLUE, String); } } return 1; }
Код:
C:\Users\Utilizador\Desktop\programas\geh\gamemodes\hard.pwn(810) : error 028: invalid subscript (not an array or too many subscripts): "Exp" C:\Users\Utilizador\Desktop\programas\geh\gamemodes\geh.pwn(810) : error 029: invalid expression, assumed zero C:\Users\Utilizador\Desktop\programas\geh\gamemodes\geh.pwn(810) : warning 215: expression has no effect C:\Users\Utilizador\Desktop\programas\geh\gamemodes\geh.pwn(810) : error 001: expected token: ";", but found "]" C:\Users\Utilizador\Desktop\programas\geh\gamemodes\geh.pwn(810) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.