SA-MP Forums Archive
Enum not working good with mysql.. or what? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Enum not working good with mysql.. or what? (/showthread.php?tid=398938)



Enum not working good with mysql.. or what? - ADY26 - 12.12.2012

So i made a enum for players but the problem is that when i load from DB the values that should be in that var. named for example Leader instead of 1 or 0 or 2 or whatever number it loads 48,46,49 or values like this.. but if i do a
new Leader[MAX_PLAYERS]; it works perfectly.. what could be the problem
Loading :
pawn Код:
cache_get_field_content(0, "Leader", temp), PlayerData[playerid][pLeader] = strval(temp);
cache_get_field_content(0, "Member", temp), PlayerData[playerid][pMember] = strval(temp);
But if do this :
pawn Код:
cache_get_field_content(0, "Leader", temp), Leader[playerid] = strval(temp);
cache_get_field_content(0, "Member", temp), Member[playerid] = strval(temp);
It works perfectly