Poring King Posted October 19, 2020 Group: Members Topic Count: 63 Topics Per Day: 0.02 Content Count: 1016 Reputation: 191 Joined: 11/27/14 Last Seen: February 15 Share Posted October 19, 2020 (edited) I got this error I just add this 2 on OnagitBreak & OnAgitEnd //OnAgitBreak: // query_sql "SELECT `auto_id` FROM `agit_defend_stats` WHERE `castle_name`='" + getcastlename(strnpcinfo(NPC_NAME_HIDDEN)) + "' AND `woe_ended`='0' ORDER BY `auto_id` DESC LIMIT 1",.@last_conquest; // if( getarraysize(.@last_conquest) ){ // query_sql "UPDATE `agit_defend_stats` SET `lost_time`=NOW() WHERE `auto_id`='" + .@last_conquest + "'"; // query_sql "SELECT `conquest_time` FROM `agit_defend_stats` WHERE `auto_id`='" + .@last_conquest + "'", .@conquest_time$; // query_sql "UPDATE `agit_defend_stats` SET `defend_time`=TIMEDIFF(NOW(),'" + .@conquest_time$ + "') WHERE `auto_id`='" + .@last_conquest + "'"; // } // query_sql "INSERT INTO `agit_defend_stats` (castle_name, guild_id, conquest_time,woe_ended) VALUES ('" + getcastlename(strnpcinfo(NPC_NAME_HIDDEN)) + "', '" + .@GID + "', NOW(),'0')"; // // //OnAgitEnd: // query_sql "SELECT `auto_id` FROM `agit_defend_stats` WHERE `castle_name`='" + getcastlename(strnpcinfo(NPC_NAME_HIDDEN)) + "' AND `woe_ended`='0' ORDER BY `auto_id` DESC LIMIT 1",.@last_conquest; // if( getarraysize(.@last_conquest) ){ // query_sql "SELECT `conquest_time` FROM `agit_defend_stats` WHERE `auto_id`='" + .@last_conquest + "'", .@conquest_time$; // query_sql "UPDATE `agit_defend_stats` SET `defend_time`=TIMEDIFF(NOW(),'" + .@conquest_time$ + "') WHERE `auto_id`='" + .@last_conquest + "'"; // query_sql "UPDATE `agit_defend_stats` SET `woe_ended`='1' WHERE `auto_id`='" + .@last_conquest + "'"; // } /* This is my first time encounter this kind of error so i got 0 idea how to check and how to solve . I don't know how to solve "guild_mapname2gc" error Edited October 19, 2020 by Poring King Quote Link to comment Share on other sites More sharing options...
1 AnnieRuru Posted October 19, 2020 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted October 19, 2020 (edited) HAHAHAHAHAHA !!! ok you must have learn from my scripts, but strnpcinfo(NPC_NAME_HIDDEN)is HERCULES only constant in rathena, because NPC_NAME_HIDDEN isn't declare as constant number 2, it becomes 0, means strnpcinfo(0) = the full name of the npc //== AGIT Manager ========================================== prtg_cas01,197,197,0 duplicate(Gld_Agit_Manager) Agit#prtg_cas01 FAKE_NPC change strnpcinfo(NPC_NAME_HIDDEN) into strnpcinfo(2), because you are using rathena, not hercules ok some more pointing query_sql "SELECT `castle_name` FROM `agit_defend_stats`",.@castle_ranks$; if( !getarraysize(.@castle_ranks$) ){ just do query_sql "SELECT COUNT(1) FROM `agit_defend_stats`, .@count; if (!.@count) if I remember correctly, our query_sql doesn't have a row limit on how much it can fetch ... so if this having a large table, executing this line can cause server to lag SELECT `defend_time`,`guild_id`,`woe_ended` FROM `agit_defend_stats` WHERE `castle_name`='" + .@castleName$ + "' ORDER BY `defend_time` DESC LIMIT 10 index the `castle_name` and `defend_time` column Edited October 19, 2020 by AnnieRuru 1 Quote Link to comment Share on other sites More sharing options...
0 Poring King Posted October 19, 2020 Group: Members Topic Count: 63 Topics Per Day: 0.02 Content Count: 1016 Reputation: 191 Joined: 11/27/14 Last Seen: February 15 Author Share Posted October 19, 2020 (edited) 18 minutes ago, AnnieRuru said: HAHAHAHAHAHA !!! ok you must have learn from my scripts, but strnpcinfo(NPC_NAME_HIDDEN)is HERCULES only constant in rathena, because NPC_NAME_HIDDEN isn't declare as constant number 2, it becomes 0, means strnpcinfo(0) = the full name of the npc //== AGIT Manager ========================================== prtg_cas01,197,197,0 duplicate(Gld_Agit_Manager) Agit#prtg_cas01 FAKE_NPC change strnpcinfo(NPC_NAME_HIDDEN) into strnpcinfo(2), because you are using rathena, not hercules I never use Hercules and this is my first hercules sneak peak npc ^_^ . Well let say that this is rAthena script i should notice the strnpcinfo(NPC_NAME_HIDDEN) because there is no NPC_NAME_HIDDEN in strnpcinfo Well its a stupid that i didn't see it i think i should sleep now lol 12am Edited October 19, 2020 by Poring King Quote Link to comment Share on other sites More sharing options...
Question
Poring King
I got this error

I just add this 2 on OnagitBreak & OnAgitEnd
//OnAgitBreak: // query_sql "SELECT `auto_id` FROM `agit_defend_stats` WHERE `castle_name`='" + getcastlename(strnpcinfo(NPC_NAME_HIDDEN)) + "' AND `woe_ended`='0' ORDER BY `auto_id` DESC LIMIT 1",.@last_conquest; // if( getarraysize(.@last_conquest) ){ // query_sql "UPDATE `agit_defend_stats` SET `lost_time`=NOW() WHERE `auto_id`='" + .@last_conquest + "'"; // query_sql "SELECT `conquest_time` FROM `agit_defend_stats` WHERE `auto_id`='" + .@last_conquest + "'", .@conquest_time$; // query_sql "UPDATE `agit_defend_stats` SET `defend_time`=TIMEDIFF(NOW(),'" + .@conquest_time$ + "') WHERE `auto_id`='" + .@last_conquest + "'"; // } // query_sql "INSERT INTO `agit_defend_stats` (castle_name, guild_id, conquest_time,woe_ended) VALUES ('" + getcastlename(strnpcinfo(NPC_NAME_HIDDEN)) + "', '" + .@GID + "', NOW(),'0')"; // // //OnAgitEnd: // query_sql "SELECT `auto_id` FROM `agit_defend_stats` WHERE `castle_name`='" + getcastlename(strnpcinfo(NPC_NAME_HIDDEN)) + "' AND `woe_ended`='0' ORDER BY `auto_id` DESC LIMIT 1",.@last_conquest; // if( getarraysize(.@last_conquest) ){ // query_sql "SELECT `conquest_time` FROM `agit_defend_stats` WHERE `auto_id`='" + .@last_conquest + "'", .@conquest_time$; // query_sql "UPDATE `agit_defend_stats` SET `defend_time`=TIMEDIFF(NOW(),'" + .@conquest_time$ + "') WHERE `auto_id`='" + .@last_conquest + "'"; // query_sql "UPDATE `agit_defend_stats` SET `woe_ended`='1' WHERE `auto_id`='" + .@last_conquest + "'"; // } /*
This is my first time encounter this kind of error so i got 0 idea how to check and how to solve . I don't know how to solve "guild_mapname2gc" error
Link to comment
Share on other sites
2 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.