a format is a invalid function or declaration
#1

Well, I have been trying to use carlton's account system for MySQL, but I am getting syntax errors, so I am trying to create a format for creating new accounts, but I get a invalid function or declaration error
pawn Код:
format(str, sizeof(str), "INSERT INTO `playerinfo` (`user`, `pass`, `kills`, `deaths`, `score`, `money`, `IP`, `Admin`) VALUES ('%s', '%s', 0, 0, 0, 5000, '%s', 0)", pName(playerid), inputtext, PIP);
Thats my format...I'm not sure what is wrong.
Reply
#2

You dont need the ` and ` after the playerinfo
pawn Код:
format(str, sizeof(str), "INSERT INTO `playerinfo` (user,pass and so on..) VALUES ('%s', and so on)",pName(playerid));
Reply
#3

What's your 'pName' function?
Reply
#4

Quote:
Originally Posted by Fj0rtizFredde
Посмотреть сообщение
You dont need the ` and ` after the playerinfo
pawn Код:
format(str, sizeof(str), "INSERT INTO `playerinfo` (user,pass and so on..) VALUES ('%s', and so on),pName(playerid));
I just tried that, but I still get invalid function or declaration.

Edit @ Hiddos
pawn Код:
stock pName(playerid)
{
    new
        pName2[MAX_PLAYER_NAME]
    ;
    GetPlayerName(playerid, pName2, sizeof(pName2));
    return pName2;
}
EDIT #2:

Never mind, thanks for helping I got it fixed
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)