Please help, infinity loop.

Helena

New member
Messages
238
Points
0
Emulator
rAthena
Hello,

I am using annie's mission board script, but i keep getting a "run_script: infinity loop!" error. I've added a sleep2 option and changing the goto count, I've also tried adding a freeloop label but regardless this mssage keeps occuring.

(It occurs right before the window of "Accept a mission, drop a mission and submit a mission". 

I don't know how freeloop works and if this would even resolve the problem. Maybe I've put it at the wrong place?

Please help.
default_sad.png


http://upaste.me/3f7e10914bb4d6281

 
hahaha ... didn't I already said this before already ?

http://herc.ws/board/topic/4501-mission-board-repeatable-problem/?p=29183

when I made the script, the freeloop command wasn't even implemented, so we do sheep counting ...

sheep counting = count how many loops and put sleep2 accordingly

actually, just bump up your check_gotocount SHOULD have fix that problem

https://github.com/HerculesWS/Hercules/blob/master/conf/script.conf#L10

change 2048 until 2048000

prepare to lag your server ... hahaha

that's the reason I always wants to rewrite this script ...

that was my 3rd generation script ...

now I'm using 4th generation scripting style and I learned a few methods on how to optimized using string manipulations

 
Last edited by a moderator:
Hi Annie, thanks for your reply.

I did change the goto count though, to 2048000, but the problem still persists. >.<

So for now, there is no way for this to be fixed? 

 
HAHAHA !!!

nice spot

set .@size, getarraysize( getd("@ms_b_n_"+ strnpcinfo(2)) ); for ( set .@i, 1; .@i < .@size; set .@i, .@i +1 ) { if ( getd("@ms_b_n_"+ strnpcinfo(2) +"[0]") != atoi( gettimestr("%Y%m%d", 9) ) && getd(".ms_b_m_"+ getd("@ms_b_n_"+ strnpcinfo(2) +"["+ .@i +"]") +"[6]") == 1 || getd(".ms_b_m_"+ getd("@ms_b_n_"+ strnpcinfo(2) +"["+ .@i +"]") +"[6]") == 0 ) { deletearray getd("@ms_b_n_"+ strnpcinfo(2) +"["+ .@i +"]"), 1; set .@i, .@i -1 ; } }I didn't test but I think its in this line
that chunk of code needs to add set .@size, .@size -1;

Code:
    set .@size, getarraysize( getd("@ms_b_n_"+ strnpcinfo(2)) );    for ( set .@i, 1; .@i < .@size; set .@i, .@i +1 ) {        if ( getd("@ms_b_n_"+ strnpcinfo(2) +"[0]") != atoi( gettimestr("%Y%m%d", 9) ) && getd(".ms_b_m_"+ getd("@ms_b_n_"+ strnpcinfo(2) +"["+ .@i +"]") +"[6]") == 1 ||            getd(".ms_b_m_"+ getd("@ms_b_n_"+ strnpcinfo(2) +"["+ .@i +"]") +"[6]") == 0 ) {                deletearray getd("@ms_b_n_"+ strnpcinfo(2) +"["+ .@i +"]"), 1;                set .@i, .@i -1 ;                set .@size, .@size -1; // <-- this        }    }
 
Back
Top