Need to check if a Master Account exists already
#1

(Using https://sampforum.blast.hk/showthread.php?tid=291035 this gamemode, converting it to MySQL)

pawn Code:
forward AccountExists(playerid); // Checks if the master account is already registered.
public AccountExists(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        new rows;
        format(query, sizeof(query), "SELECT * FROM `MainAccount` WHERE `mID` = '%s'", PlayerName(playerid));
        cache_get_row(rows);
        if(!rows)
        {
            return true;
        }
    }
    return false;
}
What I currently have, returns these errors:
pawn Code:
error 017: undefined symbol "cache_get_row"
I'm not too sure if this will actually work aswell.
Thanks.
Reply
#2

Do you have the latest MySQL plugin?
Reply
#3

Yes.
Reply
#4

Anyone? (Sorry for bump.)
Reply
#5

Download this one and place the following includes in your pawno/include folder.
Reply
#6

Already tried that.
Reply
#7

edit: nvm
Reply
#8

Still need help please.
Reply
#9

Bump. :S
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)