[Help] MySQL variables in text.
#1

Hello,

i'm busy making my own gamemode with mysql, i'm new with this. i'm trying to fetch data from a database and than use them ingame

i have this code :
Код:
mysql_get_field("cash", Field);
PlayerInfo[playerid][pCash] = strval(Field);
Now i get a good result in numbers but i cant get them in a text like :
Код:
format(message, 256, "You have $ : %s", PlayerInfo[playerid][pCash]);
SendClientMessage(playerid, COLOR_WHITE, message);
but than i get a empty value than.

Please help me with this.
Reply
#2

%s - is for text
%d - is for numbers

so you should use %d instead of %s!
Reply
#3

but when i use a phonenumber it says just 1 but it have's 6 numbers
Reply
#4

I just get totaly other numbers a 1 becomes a 3 and my phonenumber becomes a 1 while this is a much higher number
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)