mysql problem
#1

hello, im trying to script a mysql admin script, logging in and registring works but im having some problems with saving and loading the data, i first made a script to load the data to start off

Код:
Loadplayer(playerid)
{
	new name[MAX_PLAYER_NAME];

	// Get the playername
	GetPlayerName(playerid, name, sizeof(name));
 
    new Query[200];

    format(Query, sizeof(Query), "SELECT * FROM `accounts` WHERE `user` = '%s'", name[playerid]); 
    mysql_query(Query);
    mysql_store_result();
	new line[1300];

            if(mysql_fetch_row(line)) 
            {

        			sscanf(line, "e<s[50]s[32]dddddddddddddddddd>",APlayerData[playerid]);


                    mysql_free_result();
               }
	return 1;
}
but, for some reason this isnt working, any1 knows whats wrong?(it doesnt load any data from mysql)
Reply
#2

put under OnGamemodeInit

pawn Код:
mysql_debug(1);
and try again and u get i nserver floder a file with a debug and check mysql error
Reply
#3

thanks, found the problem and fixed it =]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)