MYSQL not loading a string
#1

PHP код:
forward OnAccountLoad(playerid);
public 
OnAccountLoad(playerid)
{
    
PlayerInfo[playerid][pAdmin] = cache_get_field_content_int(0, "pAdmin");
    
PlayerInfo[playerid][pDonor] = cache_get_field_content_int(0, "pDonor");
    
PlayerInfo[playerid][pScore] = cache_get_field_content_int(0, "pScore");
    
PlayerInfo[playerid][pCash] = cache_get_field_content_int(0, "pCash");
    
PlayerInfo[playerid][pKills] = cache_get_field_content_int(0, "pKills");
    
PlayerInfo[playerid][pHelper] = cache_get_field_content_int(0, "pHelper");
    
PlayerInfo[playerid][pJailed] = cache_get_field_content_int(0, "pJailed");
    
PlayerInfo[playerid][pJailedTime] = cache_get_field_content_int(0, "pJailedTime");
    
PlayerInfo[playerid][pCaptures] = cache_get_field_content_int(0, "pCaptures");
    
PlayerInfo[playerid][pTime] = cache_get_field_content_int(0, "pTime");
    
cache_get_field_content(0, "pRegisterDate", PlayerInfo[playerid][pRegisterDate]);
    
cache_get_field_content(0, "pLastLogin", PlayerInfo[playerid][pLastLogin]);
    
SetPlayerCash(playerid, PlayerInfo[playerid][pCash]);
    
SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
    return 
1;
} 
The problem is that pLastLogin is not being loaded. Do you see anything wrong in my code?

I've checked the table and I have the field pLastLogin
Reply
#2

Is your PlayerInfo[playerid][pLastLogin] a string?
Reply
#3

https://sampwiki.blast.hk/wiki/MySQL/R33..._field_content

Quote:

You have to provide the size (max_len) by yourself if you use an enum-array as destination

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)