15.01.2014, 13:15
hello, I am converting my server from Dini to MYSQL and i use the plugin of StrickenKid...
and this is my Query for loading data.
the problem is that the sscanf string load 23 variables at one time and I need to load 139 variables! how can I do?
and this is my Query for loading data.
Код:
public OnPlayerLogin(playerid,password[]) { new string[300]; format(string, sizeof(string), "SELECT * FROM `utenti` WHERE (`Nick` = '%s' AND `Password` = '%s')", PlayerName(playerid), password); mysql_query(string); mysql_store_result(); if(mysql_num_rows() != 0) { while(mysql_fetch_row(string, "|")) { sscanf(string, "p<|>dddddddddddddddddddd", PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pLottoNr], PlayerInfo[playerid][pPAntidolorifica], PlayerInfo[playerid][pPAntidroga], PlayerInfo[playerid][pPRigenerazione], PlayerInfo[playerid][pDonateRank], PlayerInfo[playerid][pRegistered], PlayerInfo[playerid][pSex], PlayerInfo[playerid][pInvWeapon], PlayerInfo[playerid][pInvAmmo], PlayerInfo[playerid][pOrologio], PlayerInfo[playerid][pZaino], PlayerInfo[playerid][pCorde], PlayerInfo[playerid][pWalkietalkie], PlayerInfo[playerid][pBenda], PlayerInfo[playerid][pTrafficoCell], PlayerInfo[playerid][pSigarette], PlayerInfo[playerid][pAccendino], PlayerInfo[playerid][pMaschera]); } mysql_free_result(); } }