Define problem - 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: Define problem (
/showthread.php?tid=658161)
Define problem -
KinderClans - 25.08.2018
So i have this define to show rental cost and for other use:
pawn Код:
#define VEHICLE_RENT_COST 20
And this is to show it:
pawn Код:
SendClientMessage(playerid, -1, "* This vehicle is for rent. You'll pay "GREEN"$""VEHICLE_RENT_COST"" every 30 seconds.");
But ingame i get: "This vehicle is for rent. You'll pay $VEHICLE_RENT_COST bla bla".
What's wrong?
Re: Define problem -
Lokii - 25.08.2018
PHP код:
#define VEHICLE_RENT_COST "20"
Re: Define problem -
KinderClans - 25.08.2018
Already tried with quotes. I'm also using that define for this:
pawn Код:
if(GetPlayerMoney(playerid) < VEHICLE_RENT_COST)
Now that i added quotes, i get:
pawn Код:
error 033: array must be indexed (variable "-unknown-")
On the get player money check.
Re: Define problem -
Lokii - 25.08.2018
PHP код:
if(GetPlayerMoney(playerid) < strval(VEHICLE_RENT_COST))
Re: Define problem -
KinderClans - 25.08.2018
I had to add # before VEHICLE_RENT_COST when send player message.
Thank you anyway, i fixed.