14.06.2016, 15:22
PHP код:
YCMD:prodajzlato(playerid, params[], help)
{
#pragma unused help
if(IsPlayerInRangeOfPoint(playerid, 1.0, 1689.6005,-1183.4509,23.8809))
{
new ammount;
if(sscanf(params, "i", ammount))
{
SCM(playerid,-1,"ES:RPG Pomoc | "SPLAVA"/prodajzlato [Kolicina]");
SCM(playerid,-1,"ES:RPG Pomoc | "SPLAVA"Prodajna cijena grama zlata je 800");
return 1;
}
else
{
new string[128], cash = ammount * 800;
PlayerInfo[playerid][pZlato] -= ammount;
GivePlayerMoney(playerid, + cash); //this is the line
format(string, sizeof(string), ""SPLAVA"Prodali ste "ZUTA"%d g zlata za "ZELENA"%d$", ammount, cash);
SCM(playerid, -1, string);
return 1;
}
}
else
{
SCM(playerid, -1, "[ES:RPG] "CRVENA"Niste na mjestu kupovine zlata!");
return 1;
}
}
Код:
C:\Users\Admin\Desktop\Extreme School\Extreme School RPG\gamemodes\ESRP.pwn(17448) : error 029: invalid expression, assumed zero C:\Users\Admin\Desktop\Extreme School\Extreme School RPG\gamemodes\ESRP.pwn(17448) : warning 215: expression has no effect C:\Users\Admin\Desktop\Extreme School\Extreme School RPG\gamemodes\ESRP.pwn(17448) : error 001: expected token: ";", but found ")" C:\Users\Admin\Desktop\Extreme School\Extreme School RPG\gamemodes\ESRP.pwn(17448) : error 029: invalid expression, assumed zero C:\Users\Admin\Desktop\Extreme School\Extreme School RPG\gamemodes\ESRP.pwn(17448) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.