wmmsr Posted May 31, 2016 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
0 Rynbef Posted June 2, 2016 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
0 hikashin-rae Posted June 2, 2016 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
0 Emistry Posted June 3, 2016 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
Question
wmmsr
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.