Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Pawn Scripting [Pawn] Command doesn't work.

 
  • 0 Vote(s) - 0 Average
Pawn Command doesn't work.
Ryder Sixz
Offline

Burgershot Member
Posts: 28
Threads: 10
Joined: Nov 2020
Reputation: 0
Location: San Andreas
#1
2020-12-03, 04:17 PM
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!
Pinch
Offline

Burgershot Member
Posts: 391
Threads: 19
Joined: Apr 2019
Reputation: 22
Location: Belgrade, Serbia
#2
2020-12-03, 06:07 PM
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.
Ryder Sixz
Offline

Burgershot Member
Posts: 28
Threads: 10
Joined: Nov 2020
Reputation: 0
Location: San Andreas
#3
2020-12-03, 07:47 PM
(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!
DaZzY
Offline

Burgershot Member
Posts: 74
Threads: 12
Joined: Oct 2020
Reputation: 2
#4
2020-12-08, 10:33 PM
i get a weird problem like this and when i removed SetPlayerHealth from code the command work ... idk why
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode