Jump to content
  • 0

[Question sql&var] Upgrade number's


Question

Posted

Hey Friends/Folks

Well i have qeustion about var/sql.

every update +100 update but.. it doenst work Keep Only 100. nothings 200 just wonder if someone can help me :)

query_sql("UPDATE `char` SET `pvp_exp` = 100 WHERE `char_id` = '"+getcharid(0)+"' ");

Dramosith.

7 answers to this question

Recommended Posts

Posted

Aagh!, sorry sorry, my english isnt very well. but. if i want make to variable then..

setarray .PVP_EXP[0],550,200,300;
query_sql("UPDATE `char` SET `pvp_exp` = `pvp_exp`+.PVP_EXP[0] WHERE `char_id` = '"+getcharid(0)+"' ");

like that? it coud works fine? but it isnt work for me =/

Dramosith.

Posted

It doesnt work because you put .PVP_EXP[0] in string.

This should work:

query_sql("UPDATE `char` SET `pvp_exp` = `pvp_exp`+"+.PVP_EXP[0]+" WHERE `char_id` = '"+getcharid(0)+"' ");

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...