I'm trying to implement a housing system for my server that allows me as an admin to add house owners through the NPC menu.
When the NPC successfully checks for the admin group_id, they are allowed to input an integer (account_id of a player) that is then passed on as variable to the SQL server.
T_Add:
input .@aid;
if (.@aid <= 0) goto T_Fail;
if (.@aid > 2099999) goto T_Fail;
if (.@aid < 2000000) goto T_Fail;
if (.@aid != 0){
query_sql "INSERT INTO `global_reg_value` (`char_id`, `str`, `value`, `type`, `account_id`) VALUES ('0','owner','1','1','"+.@aid+"')";
}
The SQL query works fine and is passed to the server without problems. However, the account which is supposed to be a houseowner now is not detected by the NPC. I check for the variable (##owner) at the beginning of the script.
if(##owner==1) goto T_Owner;
I have tried many variations of this, but it seems none of them are working. The account is always detected as non-houseowner. Could someone tell me what I'm doing wrong?
Question
Bifrost
I'm trying to implement a housing system for my server that allows me as an admin to add house owners through the NPC menu.
When the NPC successfully checks for the admin group_id, they are allowed to input an integer (account_id of a player) that is then passed on as variable to the SQL server.
The SQL query works fine and is passed to the server without problems. However, the account which is supposed to be a houseowner now is not detected by the NPC. I check for the variable (##owner) at the beginning of the script.
I have tried many variations of this, but it seems none of them are working. The account is always detected as non-houseowner. Could someone tell me what I'm doing wrong?
Link to comment
Share on other sites
11 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.