open.mp forum
[Pawn] Command doesn't work. - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10)
--- Thread: [Pawn] Command doesn't work. (/showthread.php?tid=1407)



Command doesn't work. - Ryder Sixz - 2020-12-03

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!


RE: Command doesn't work. - Pinch - 2020-12-03

What's mysql_function_query supposed to be?


RE: Command doesn't work. - Ryder Sixz - 2020-12-03

(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!


RE: Command doesn't work. - DaZzY - 2020-12-08

i get a weird problem like this and when i removed SetPlayerHealth from code the command work ... idk why