18.12.2016, 22:06
Yeah but if I make a printf or SendClientMessage in OnSmsUserLoad, it shows the message.
From MySQL the data is retrived okay, because these shows the message fine:
I think the problem comes when I try to call pSMS[playerid][Message][loaded], for example:
From MySQL the data is retrived okay, because these shows the message fine:
Код:
public OnSmsUserLoad(playerid, telefono) { new id, loaded; while(loaded < cache_get_row_count()) { id = cache_get_field_content_int(loaded, "ID"); pSMS[playerid][ID][loaded] = id; pSMS[playerid][Telep][loaded] = cache_get_field_content_int(loaded, "Phone"); pSMS[playerid][From][loaded] = cache_get_field_content_int(loaded, "From"); cache_get_field_content(loaded, "Message", pSMS[playerid][Message][loaded]); pSMS[playerid][Stats][loaded] = cache_get_field_content_int(loaded, "Stats"); SendClientMessage(playerid, -1, pSMS[playerid][Message][loaded]); loaded++; } }
Код:
pSMS[playerid][Phone][1]; // Shows number OK pSMS[playerid][Message][1]; // Shows message incorrectly.