Jump to content
  • 0

Save character data


hthuong

Question


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  39
  • Reputation:   0
  • Joined:  08/09/12
  • Last Seen:  

How to save character data to SQL with script?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  118
  • Reputation:   6
  • Joined:  12/20/12
  • Last Seen:  

You have to use something like this

query_sql "SELECT `str` FROM global_reg_value WHERE account_id = " +.@idcuenta[0], .@array$[0]; // check cash points

if (.@array$[0] != "#CASHPOINTS") { // if not then null

query_sql "INSERT INTO `global_reg_value` (`char_id`,`str`,`value`,`type`,`account_id`) VALUES ('0','#CASHPOINTS','" +.@cantidad +"','2','" +.@idcuenta[0] +"')"; // Create cash points SQL

} else { // Cash exist

// update

} // End if

this is just an example of Rokimoki's guide n_n ~

Edited by aisha
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...