Help :D - 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: Help :D (
/showthread.php?tid=647799)
Help :D -
BluePlayBG - 11.01.2018
Код:
if !Inventory_HasItem(i, "Health Insurance")
{
GivePlayerMoney(i, -50);
}
This error comes up:
Код:
error 001: expected token: "*then", but found "{"
Re: Help :D -
KyNe - 11.01.2018
Quote:
Originally Posted by BluePlayBG
Код:
if !Inventory_HasItem(i, "Health Insurance")
{
GivePlayerMoney(i, -50);
}
This error comes up:
Код:
error 001: expected token: "*then", but found "{"
|
Код:
if !Inventory_HasItem(i, "Health Insurance");
{
GivePlayerMoney(i, -50);
}
or
Код:
if !Inventory_HasItem(i, "Health Insurance"))
{
GivePlayerMoney(i, -50);
}
im not sure if this work,maybe it will
Re: Help :D -
iLearner - 11.01.2018
PHP код:
if(!Inventory_HasItem(i, "Health Insurance"))
{
GivePlayerMoney(i, -50);
}
Re: Help :D -
jasperschellekens - 11.01.2018
Quote:
Originally Posted by BluePlayBG
Код:
if !Inventory_HasItem(i, "Health Insurance")
{
GivePlayerMoney(i, -50);
}
This error comes up:
Код:
error 001: expected token: "*then", but found "{"
|
I marked the things i added red.
You forgot to add a ( after if and you also forgot it to close with ) at the end.
Код:
if(!Inventory_HasItem(i, "Health Insurance"))
{
GivePlayerMoney(i, -50);
}
Re: Help :D -
BluePlayBG - 11.01.2018
Thanks lol, I don't know how I did not add ( lol