a format is a invalid function or declaration - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: a format is a invalid function or declaration (
/showthread.php?tid=166496)
a format is a invalid function or declaration -
Toni - 08.08.2010
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.
Re: a format is a invalid function or declaration -
Fj0rtizFredde - 08.08.2010
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));
Re: a format is a invalid function or declaration -
Hiddos - 08.08.2010
What's your 'pName' function?
Re: a format is a invalid function or declaration -
Toni - 08.08.2010
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