• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Command doesn't work.
#1
Hi, I have been trying to save a variable to mysql database, with this command:



Code:
CMD:ded(playerid, params[])

{

? ? new Query[256];

? ? Fondos[FondosFC] = 1000;

? ? format(Query, 200, "UPDATE `variableglobal` SET `FondosC`='%d'", Fondos[FondosFC]);

? ? mysql_function_query(Conecction, Query, true, "OnQueryFinish", "ii", 0, playerid);

? ? return 1;

}



The problem is that when I check in the phpmyadmin, the variable is at 0, that is, it was not saved with the command. Does anyone know what is wrong with the code? thanks!
  Reply
#2
What's mysql_function_query supposed to be?
Using Pawn.CMD?

If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
  Reply
#3
(2020-12-03, 06:07 PM)Pinch Wrote: What's mysql_function_query supposed to be?



It doesn't matter, I already solved it, thanks anyway bro!
  Reply
#4
i get a weird problem like this and when i removed SetPlayerHealth from code the command work ... idk why
  Reply


Forum Jump: