• Advertisement
Sign in to follow this  

Season stops after query update

This topic is 1317 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello

I have a problem with update/delete queries.

 

I added a https://github.com/zupet/LuaTinker into my c++ game and everything works fine.

Except that the player stops after I do a update/delete query.

 

If I do a query which return data to lua then everything works fine.

 

Any idea what it could be? I already tryed void and bool but both didnt help.

 

edit:

Currently in lua the delete query function

g_test:DelBagItem ( role , itemid , 1 )
 
I changed it to
xd = g_test:DelBagItem ( role , itemid , 1 )
print("xdd"..xd)

and it prints me "xdd1"

 

edit2:

the problem is because of this:

app->db->prepare("UPDATE items SET count=? WHERE id=? ");
app->db->setInt(1, Count);
app->db->setInt(2, ItemID);
app->db->execute(); <-- if execute run then the season from player stop.
 
If I do
app->db->execute("UPDATE items SET count=20 WHERE id=1400220");
 
then everything keep working.
 
Whats wrong?
 
problem solved.
Edited by Daneos

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement