Problema com PlayerUpdate -
LKING - 21.05.2014
Код:
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.
Re: Problema com PlayerUpdate -
LKING - 21.05.2014
help please
Re: Problema com PlayerUpdate -
MultiKill - 21.05.2014
Quote:
Originally Posted by LKING
help please
|
Mostre onde й a linha 810.
Re: Problema com PlayerUpdate -
LKING - 21.05.2014
format(String, sizeof(String), "%.0f%", (floatdiv(Exp[playerid], TExp[playerid]) * 100.0));
Re: Problema com PlayerUpdate -
MultiKill - 21.05.2014
pelo o que parece o erro estб acontecendo por causa disso:
pawn Код:
(floatdiv(Exp[playerid], TExp[playerid]) // por causa dos ( )
Re: Problema com PlayerUpdate -
LKING - 21.05.2014
e que faзo?
Re: Problema com PlayerUpdate -
PT - 21.05.2014
acrescenta 1 ) ta faltando
Re: Problema com PlayerUpdate -
MultiKill - 21.05.2014
floatdiv й uma stock, callback ou variбvel?
Re: Problema com PlayerUpdate -
PT - 21.05.2014
Quote:
Originally Posted by MultiKill
floatdiv й uma stock, callback ou variбvel?
|
https://sampwiki.blast.hk/wiki/Floatdiv
Re: Problema com PlayerUpdate -
MultiKill - 21.05.2014
Quote:
Originally Posted by PT
|
@OFF
Nгo sabia dessa funзгo.
@Topic
PT vocк que й mais experiente. O erro nгo estaria acontecendo por causa disso:
Код:
format(String, sizeof(String), "%.0f%", (floatdiv(Exp[playerid], TExp[playerid]) * 100.0));