Strange bug
#1

Strange bug... I have maded myself a mysql based Characters system. And it takes the rows from the database and cuts them into arrays, one of them is cmoney, means characterpocketmoney. The New smth; thing of it is new cmoney[MAX_PLAYERS]; , MAX_PLAYERS because there will be other characters for this array so i will use cmoney[playerid];
So everything is fine, character gets money when i use GivePlayerMoney();... But when i use a function printf(cmoney[playerid]); it gives me some random letter, or even blank space... How to solve it ? Because i need this array to update my database.

format query, sizeof(query), "UPDATE `something` SET `cmoney` = '%s' WHERE `username` = '%s'", cmoney[playerid], username;
print (query);
Returns me UPDATE `something` SET `cmoney` = '' WHERE `username` = 'Paranoja'
Even know cmoney[playerid] works perfectly on adding the money or somth.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)