WordsUp Posted December 29, 2011 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 24 Reputation: 0 Joined: 12/03/11 Last Seen: August 11, 2013 Share Posted December 29, 2011 I have created this code for my server and inserted it on my agit_template.txt file but the problem is everytime the emp is broken it didn't return query_sql "SELECT `char_id` FROM `char` WHERE `char_id` = '"+getcharid(0)+"'",@exist$; if (getarraysize(@exist$) != 0){ query_sql "UPDATE `char` SET `empbreak` = `empbreak` + '1' WHERE `char_id` = '"+getcharid(0)+"'"; end; } query_sql "SELECT `guild_id` FROM `woe_guild_breaks` WHERE `guild_id` = '"+getcharid(2)+"'",@GDExist$; if (getarraysize(@GDExist$) != 0){ query_sql "UPDATE `woe_guild_breaks` SET `id` = `id` + '1' WHERE `guild_id` = '"+getcharid(2)+"'"; } else { query_sql "INSERT INTO `woe_guild_breaks` (`castle_id`, `guild_id`, `id`) VALUES ('15','"+getcharid(2)+"','1')"; end; } Quote Link to comment Share on other sites More sharing options...
JayPee Posted December 29, 2011 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 633 Reputation: 78 Joined: 11/14/11 Last Seen: September 20, 2017 Share Posted December 29, 2011 (edited) char_id is a integer i guess it should be @exist guild_id is a integer i guess it should be @GDExist I guess your insert command must be like this query_sql "INSERT INTO `woe_guild_breaks` (`castle_id`, `guild_id`, `id`) VALUES ('15',"+getcharid(2)+",1)"; [/code] Edited December 29, 2011 by JayPeeMateo Quote Link to comment Share on other sites More sharing options...
WordsUp Posted December 29, 2011 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 24 Reputation: 0 Joined: 12/03/11 Last Seen: August 11, 2013 Author Share Posted December 29, 2011 char_id is a integer i guess it should be @exist guild_id is a integer i guess it should be @GDExist I guess your insert command must be like this query_sql "INSERT INTO `woe_guild_breaks` (`castle_id`, `guild_id`, `id`) VALUES ('15',"+getcharid(2)+",1)"; [/code] the query_sql works fine it saves into my sql correctly. the char_id and guild_id i didn't understand sorry. Quote Link to comment Share on other sites More sharing options...
JayPee Posted December 29, 2011 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 633 Reputation: 78 Joined: 11/14/11 Last Seen: September 20, 2017 Share Posted December 29, 2011 char_id and guild_id both returns an integer or numerical value. a variable that ends with a $ means it is a string variable but a variable do not end with a $ it is considered as integer or numerical variable .myvar$ - this is string variable. .myvar - this is integer or numerical variable. Quote Link to comment Share on other sites More sharing options...
WordsUp Posted December 29, 2011 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 24 Reputation: 0 Joined: 12/03/11 Last Seen: August 11, 2013 Author Share Posted December 29, 2011 ahh okay thanks i will try that Quote Link to comment Share on other sites More sharing options...
Question
WordsUp
I have created this code for my server and inserted it on my agit_template.txt file but the problem is everytime the emp is broken it didn't return
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.