MySQL R7 problem
#1

So i made three rows ( Vip , tkicked and tkickeda ) vip is vip level , tkicked is how many times was the player kicked and tkickeda how many times he kicked a player as admin.. but the problem is that in DB they are 0 and in game random number like : 55 , 50 , 53 but the admin row works perfectly..
So what could be the problem ?
What part of code should i show ?
Reply
#2

Those are all supposed to be integers, you might be saving or loading them as strings.
Reply
#3

Quote:
Originally Posted by SuperViper
Посмотреть сообщение
Those are all supposed to be integers, you might be saving or loading them as strings.
In database they are integers.
Load :
pawn Код:
cache_get_field_content(0, "Vip", temp), PlayerData[playerid][pVip] = strval(temp);
    cache_get_field_content(0, "TKicked", temp), PlayerData[playerid][pTKicked] = strval(temp);
    cache_get_field_content(0, "TKickeda", temp), PlayerData[playerid][pTKickeda] = strval(temp);
I don't have save because i don't need to.
Also the callback is called by this :

pawn Код:
format(query, sizeof(query), "SELECT * FROM `users` WHERE `id` = %d", PlayerData[playerid][pSQLid]);
    mysql_function_query(g_Handle, query, true, "OnAccountLoad", "d", playerid);
That d should be for all fields that i load .. ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)