OmarAcero 16 Posted February 15, 2015 (edited) I Have this problem: run_script: infinity loop ! please helpme.... ---> The_Scritp Edited February 15, 2015 by OmarAcero Quote Share this post Link to post Share on other sites
0 evilpuncker 504 Posted February 15, 2015 use this: --------------------------------------- *freeloop(<toggle>) Toggling this to enabled (1) allows the script instance to bypass the infinite loop protection, allowing your script to loop as much as it may need. Disabling (0) may warn you if an infinite loop is detected if your script is looping too many times. Please note, once again, that this isn't a solution to all problems, and by disabling this protection your Hercules server may become laggy or unresponsive if the script it is used in is performing lenghty loop operations. Example: freeloop(1); // enable script to loop freely //Be aware with what you do here. for (.@i = 0; .@i < .@bigloop; ++.@i) { dothis; // will sleep the script for 1ms when detect an infinity loop to // let Hercules do what it need to do (socket, timer, process, // etc.) } freeloop(0); // disable for (.@i = 0; .@i < .@bigloop; ++.@i) { dothis; // throw an infinity loop error } --------------------------------------- Quote Share this post Link to post Share on other sites
0 OmarAcero 16 Posted February 15, 2015 (edited) Usted me puede indicar en que parte del código, yo debería editar? ¿Puede usted me puede mostrar algún ejemplo por favor? You can tell me Where in the code, I Should edit ? Can you Show me some For instance in the script, please? bk6.txt Edited February 17, 2015 by OmarAcero Quote Share this post Link to post Share on other sites
0 Angelmelody 221 Posted February 15, 2015 you should follow its installation guide [*]Modify "script_athena.conf" setting this values to the check_* parameters. [*]check_cmdcount: 655360 [*]check_gotocount: 655360 Quote Share this post Link to post Share on other sites
0 OmarAcero 16 Posted February 15, 2015 (edited) //-------------------------------------------------------- // rAthena Script Configuration File //-------------------------------------------------------- warn_func_mismatch_paramnum: yes check_cmdcount: 655360 check_gotocount: 655360 // Default value of the 'min' argument of the script command 'input'. // When the 'min' argument isn't provided, this value is used instead. // Defaults to 0. //input_min_value: 0 // Default value of the 'max' argument of the script command 'input'. // When the 'max' argument isn't provided, this value is used instead. // Defaults to INT_MAX. //input_max_value: 2147483647 input_max_value: 10000000 // Specifies whether or not each built-in function's arguments are checked for // correct type. When a function is given an argument different from what it // expects, a warning is thrown before the function is ran anyway. // Default: yes warn_func_mismatch_argtypes: yes import: conf/import/script_conf.txt yes, i dont understand '¿?, run_script: infinity loop ! again Edited February 17, 2015 by OmarAcero Quote Share this post Link to post Share on other sites
0 OmarAcero 16 Posted February 17, 2015 (edited) Friends, I think I almost got it after studying all the code, I discovered where it originates infinity loop ... I found it in the next NPC, i am increasing and playing, "NEXT; ". NOTE But now I get an error called: script_rid2sd: fatal error ! player not attached! My question is this normal? function script BKLoadConfiguration { debugmes "BotKiller 6: Loading configuration..."; query_sql "select count(*) from `bk6_config`",.@Cnt$; set .@Page,0; set .@PageSize,50; set .@TotParams,.@Cnt$[0]; while (.@TotParams > 0) { set .@Cfg, query_sql("select `var`, `value`, if(right(`var`,1)='$',1,0) `str` from `bk6_config` limit " + .@Page + "," + .@PageSize,.@Var$,.@Val$,.@Str); if (playerattached()) dispbottom "BotKiller 6: Processing " + .@Cfg + " parameter(s)..."; else debugmes "BotKiller 6: Processing " + .@Cfg + " parameter(s)..."; for (set .@x,0; .@x < .@Cfg; set .@x, .@x + 1) if (.@Str[.@x]) setd .@Var$[.@x],.@Val$[.@x]; else setd .@Var$[.@x],atoi(.@Val$[.@x]); set .@TotParams, .@TotParams - .@PageSize; set .@Page, .@Page + .@PageSize;// sleep2 2000;// next; } debugmes "BotKiller 6: " + .@Cnt$[0] + " parameter(s) loaded"; sleep2 2000; debugmes "BotKiller 6: Loading map ignore list..."; set .@Cnt,1; set .@Page,0; while (.@Cnt) { set .@Cnt, query_sql("select mapname from bk6_maps limit " + .@Page + ",100",.@IgnoredMap$); for (set .@x,0; .@x < .@Cnt; set .@x,.@x + 1) { setd "$@_" + .@IgnoredMap$[.@x],1; } set .@Page, .@Page + 100; next; // writing this NEXT; (For example cured the infinity loop) }// sleep2 1000; if (playerattached()) dispbottom "Reload Configuration: Complete!"; return;} Edited February 17, 2015 by OmarAcero Quote Share this post Link to post Share on other sites
0 Angelmelody 221 Posted February 17, 2015 you can try freeloop(1); while (.@Cnt) {set .@Cnt, query_sql("select mapname from bk6_maps limit " + .@Page + ",100",.@IgnoredMap$);for (set .@x,0; .@x < .@Cnt; set .@x,.@x + 1) {setd "$@_" + .@IgnoredMap$[.@x],1;}set .@Page, .@Page + 100;} freeloop(0); Quote Share this post Link to post Share on other sites
0 OmarAcero 16 Posted February 18, 2015 Friend thanks for replying, edit as you indicated me... Now I get the following error... I can enter the login and char, but I can not enter the map... freeloop(1); while (.@Cnt) {set .@Cnt, query_sql("select mapname from bk6_maps limit " + .@Page + ",100",.@IgnoredMap$);for (set .@x,0; .@x < .@Cnt; set .@x,.@x + 1) {setd "$@_" + .@IgnoredMap$[.@x],1;}set .@Page, .@Page + 100;} freeloop(0); Quote Share this post Link to post Share on other sites
0 jaBote 438 Posted February 18, 2015 I believe the error is located somewhere else. These debug messages are intentionally sent from the script via the debugmes script command. Quote Share this post Link to post Share on other sites
I Have this problem: run_script: infinity loop !
please helpme.... ---> The_Scritp
Edited by OmarAceroShare this post
Link to post
Share on other sites