error 035: argument type mismatch (argument 1)
#6

Alright guys, so I found another way to do this, and I tested it several times and it works, BUT I somewhat think that for some reason the way I found that works is inefficient and requires too much data saving, strings, etc..
So even though what I have now works, I'd like to get more comments, maybe there's a way to optimize the function.

My current function:
PHP код:
GetStats(playerid)
{
    new 
string[128],
        
pName[MAX_PLAYER_NAME+1],
        
savingstring[20];
    
GetPlayerName(playeridpNamesizeof(pName));
    
format(stringsizeof(string), "SELECT * FROM users WHERE username = '%s'"pName);
    
mysql_query(string);
    
mysql_store_result();
    while(
mysql_fetch_row_format(string))
    {
        
mysql_fetch_field_row(savingstring"admin"); gPlayerInfo[playerid][pAdmin] = strval(savingstring);
    }
    
mysql_free_result();
    return 
1;

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)