This is hapening.. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: This is hapening.. (
/showthread.php?tid=609607)
This is hapening.. -
Micko123 - 14.06.2016
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;
}
}
I get these errors
Код:
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.
Re: This is hapening.. -
OmegaKiller72 - 14.06.2016
show line 17448
Re: This is hapening.. -
Micko123 - 14.06.2016
Here you go
PHP код:
GivePlayerMoney(playerid, + cash); //this is the line
Read first
Re: This is hapening.. -
Stinged - 14.06.2016
You can only using
- in GivePlayerMoney.
Change it to this:
Код:
GivePlayerMoney(playerid, cash);
And you should stop making new threads that are about the same command.
You can just post on the old thread that something's not working.
Re: This is hapening.. -
Micko123 - 14.06.2016
well old thread was about /buygold this one is about /sellgold
And by the way thank you for help. it worked