Jump to content
  • 0

[Question sql&var] Upgrade number's


Dramosith

Question


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  62
  • Reputation:   2
  • Joined:  10/17/12
  • Last Seen:  

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.

Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  117
  • Reputation:   18
  • Joined:  01/06/12
  • Last Seen:  

Try using this:

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  62
  • Reputation:   2
  • Joined:  10/17/12
  • Last Seen:  

Thanks Friend JoWei =)

it works but how about using variable(setarray)?

Edited by Dramosith
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  117
  • Reputation:   18
  • Joined:  01/06/12
  • Last Seen:  

I'm not quite sure what you mean by "using variable(setarray)".

Can you try to explain it more?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  62
  • Reputation:   2
  • Joined:  10/17/12
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  117
  • Reputation:   18
  • Joined:  01/06/12
  • Last Seen:  

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)+"' ");

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  62
  • Reputation:   2
  • Joined:  10/17/12
  • Last Seen:  

Ah Thanks so much :), it works :D

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  117
  • Reputation:   18
  • Joined:  01/06/12
  • Last Seen:  

You're welcome. :3

Link to comment
Share on other sites

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.

×
×
  • Create New...