Define problem
#1

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?
Reply
#2

PHP код:
#define VEHICLE_RENT_COST "20" 
Reply
#3

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.
Reply
#4

PHP код:
if(GetPlayerMoney(playerid) < strval(VEHICLE_RENT_COST)) 
Reply
#5

I had to add # before VEHICLE_RENT_COST when send player message.
Thank you anyway, i fixed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)