Checking if account exists
#1

This isn't working as I'd like it too.
pawn Код:
stock AccountExists(playerid, name[]) {
    new Query[128];
    format(Query, sizeof Query, "SELECT `Name` FROM `accounts` WHERE `Name` = '%s'", name);
    mysql_tquery(dbHandle, Query, "AccountReturn", "i", playerid);
    return 1;
}

forward AccountReturn(playerid);
public AccountReturn(playerid) {
    new rows, fields;
    cache_get_data(rows, fields, dbHandle);
    if(rows) {
        return 1;
    }
    return 0;
}
I have a master account system, where you need to register your master account and then create a character, so the function will check if the character name already exists in the database, but it doesn't work properly.
Reply


Messages In This Thread
Checking if account exists - by Luis- - 09.02.2015, 18:18
Re: Checking if account exists - by HazardouS - 09.02.2015, 18:24
Re: Checking if account exists - by Luis- - 09.02.2015, 18:32
Re: Checking if account exists - by Sawalha - 09.02.2015, 18:33
Re: Checking if account exists - by Luis- - 09.02.2015, 18:41
Re: Checking if account exists - by Sawalha - 09.02.2015, 18:45
Re: Checking if account exists - by Luis- - 09.02.2015, 18:47
Re: Checking if account exists - by Sime30 - 09.02.2015, 18:48
Re: Checking if account exists - by HazardouS - 09.02.2015, 18:53
Re: Checking if account exists - by Sime30 - 09.02.2015, 18:57

Forum Jump:


Users browsing this thread: 1 Guest(s)