14.06.2014, 17:50
Sorry for double posting.
I got 2 errors :P
Lines 1486-1512:
I got 2 errors :P
Код:
\account.pwn(1497) : error 017: undefined symbol "playerid" \account.pwn(1498) : error 017: undefined symbol "playerid"
pawn Код:
buylevel()
{
foreach(Player, i)
{
new nxtlevel = GetPVarInt(i, "Level")+1;
//new costlevel = nxtlevel*levelcost;
new expamount = nxtlevel*levelexp;
new infostring[96];
new exp = GetPVarInt(i, "RespectPoints");
if (exp < expamount)
{
format(infostring, sizeof(infostring), " You need %d respect points! You only have [%d] !",expamount,GetPVarInt(playerid,"RespectPoints"));
SendClientMessage(playerid, COLOR_LIGHTRED, infostring);
continue;
}
format(infostring, sizeof(infostring), "~g~LEVEL UP~n~~w~You Are Now Level %d", nxtlevel);
GameTextForPlayer(i, infostring, 5000, 1);
PlayerPlaySound(i, 1052, 0.0, 0.0, 0.0);
PlayerPlayMusic(i);
//GiveMoneyEx(playerid, -costlevel);
SetPVarInt(i, "Level", nxtlevel);
SetPlayerScore(i, nxtlevel);
exp -= expamount;
SetPVarInt(i, "RespectPoints", exp);
}
}