wmmsr Posted May 31, 2016 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 16 Reputation: 0 Joined: 02/17/12 Last Seen: January 30 Share Posted May 31, 2016 function script bg_checkmsg { .@checkemulator = callfunc("bg_getconfiginfo","1"); if( !.@checkemulator ) query_sql "SELECT `value` FROM `char_reg_num` WHERE `char_id`='" + getarg(0) + "' AND `key`='bg_enable_msg'", .@value; else query_sql "SELECT `value` FROM `acc_reg_num` WHERE `account_id`='" + getarg(0) + "' AND `key`='bg_enable_msg'", .@value; return (!getarraysize(.@value)?0:1); } I am using the function of acc_reg_num but she not this recording in SQL because the syntax is wrong someone can fix? Quote Link to comment Share on other sites More sharing options...
0 hikashin-rae Posted June 2, 2016 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 213 Reputation: 24 Joined: 01/14/13 Last Seen: April 8 Share Posted June 2, 2016 can you please provide sql creation . Quote Link to comment Share on other sites More sharing options...
0 Rynbef Posted June 2, 2016 Group: Forum Moderator Topic Count: 48 Topics Per Day: 0.01 Content Count: 941 Reputation: 125 Joined: 05/23/12 Last Seen: Saturday at 06:31 PM Share Posted June 2, 2016 function script bg_checkmsg { .@checkemulator = callfunc("bg_getconfiginfo","1"); if( !.@checkemulator ) query_sql ("SELECT `value` FROM `char_reg_num` WHERE `char_id`='" + getarg(0) + "' AND `key`='bg_enable_msg'", .@value); else query_sql ("SELECT `value` FROM `acc_reg_num` WHERE `account_id`='" + getarg(0) + "' AND `key`='bg_enable_msg'", .@value); return (!getarraysize(.@value)?0:1); } You'll need to add ( after query_sql and ) before semicolon. Rynbef~ Quote Link to comment Share on other sites More sharing options...
0 hikashin-rae Posted June 2, 2016 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 213 Reputation: 24 Joined: 01/14/13 Last Seen: April 8 Share Posted June 2, 2016 function script bg_checkmsg { .@checkemulator = callfunc("bg_getconfiginfo","1"); if( !.@checkemulator ) query_sql ("SELECT `value` FROM `char_reg_num` WHERE `char_id`='" + getarg(0) + "' AND `key`='bg_enable_msg'", .@value); else query_sql ("SELECT `value` FROM `acc_reg_num` WHERE `account_id`='" + getarg(0) + "' AND `key`='bg_enable_msg'", .@value); return (!getarraysize(.@value)?0:1); } You'll need to add ( after query_sql and ) before semicolon. Rynbef~ no semi colon or got still going to work there is nothing problem there. Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted June 3, 2016 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: 39 minutes ago Share Posted June 3, 2016 depend on "When" did you save/update the values. the server itself save/update these values every short interval based on your conf configuration. Default: 300 seconds. Quote Link to comment Share on other sites More sharing options...
Question
wmmsr
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.