Jump to content
  • 0
Sign in to follow this  
Helena

Please help, infinity loop.

Question

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. :(

 

http://upaste.me/3f7e10914bb4d6281

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

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

Share this post


Link to post
Share on other sites
  • 0

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? 

Share this post


Link to post
Share on other sites
  • 0

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;

    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        }    }

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.