28.08.2014, 17:22
I have a problem with this function when i load the player info from the mysql server... please help
Line 926:
Код:
(926) : error 035: argument type mismatch (argument 4)
Код:
stock LoadPlayerInfo(playerid)
{
new string[128],Name[MAX_PLAYER_NAME];
GetPlayerName(playerid,Name,sizeof(Name));
format(string,sizeof(string),"SELECT `Cash`, `Admin`, `Faction`, `Rank`, `Leader`, `FWarns`, `Radio`, `Channel`, `Slot`, `Skin`, `Kills`, `Deaths`, `Banned` FROM `users` WHERE `Username` = '%s",Name);
mysql_tquery(MySQL,string,"OnPlayerDataLoad",playerid);
}
Skeleton::OnPlayerDataLoad(playerid)
{
PlayerInfo[playerid][pCash] = cache_get_field_content_int(0,"Cash");
PlayerInfo[playerid][pAdmin] = cache_get_field_content_int(0,"Admin");
PlayerInfo[playerid][pFaction] = cache_get_field_content_int(0,"Faction");
PlayerInfo[playerid][pRank] = cache_get_field_content_int(0,"Rank");
PlayerInfo[playerid][pLeader] = cache_get_field_content_int(0,"Leader");
PlayerInfo[playerid][pFWarns] = cache_get_field_content_int(0,"FWarns");
PlayerInfo[playerid][pRadio] = cache_get_field_content_int(0,"Radio");
PlayerInfo[playerid][pChannel] = cache_get_field_content_int(0,"Channel");
PlayerInfo[playerid][pSlot] = cache_get_field_content_int(0,"Slot");
PlayerInfo[playerid][pSkin] = cache_get_field_content_int(0,"Skin");
PlayerInfo[playerid][pKills] = cache_get_field_content_int(0,"Kills");
PlayerInfo[playerid][pDeaths] = cache_get_field_content_int(0,"Deaths");
PlayerInfo[playerid][pBanned] = cache_get_field_content_int(0,"Banned");
return 1;
}
Код:
mysql_tquery(MySQL,string,"OnPlayerDataLoad",playerid);



, rep++