Mysql (mysql_get_field)
#1

I have a problem with mysql_get_field


pawn Код:
new result[32],result2[32],result3[32];
mysql_get_field("money", result);
mysql_get_field("job", result2);                   
mysql_get_field("admin", result3);                 
plInfo[playerid][pMoney] = strval(result);
plInfo[playerid][pStaff] = strval(result2);
GivePlayerMoney(playerid, plInfo[playerid][pMoney]);
Its not setting the value for the player if anyone can help me
Reply
#2

Not fixed, the mysql data is not saving the plInfo[playerid][pStaff] (Was [pAdmin])
Reply
#3

We need more of your code to answer this properly.
Also, a little tip for you: Instead of creating three strings, use an array:

pawn Код:
new result[3][32];
result[0] = ... // result 1
result[1] = ... // result 2
result[2] = ... // result 3
result[3] is filled with the termination string, if you want to use it you have to extend the array. (More info: Wiki)
Reply
#4

thanks i tried doing this but it didn't work and i fixed it sorry i didn't say
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)