Jump to content
  • 0

H>Hateffect infinite loop


GM Winter

Question


  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

hello how to fix this

 

Quote

-    script    HATEFFECT    -1,{

OnHatEffect:
    if(getgmlevel()>= 0){
    input .@number;
    if (.@number < 1) end;
    if (.@number >= 726) end;
    for(.@i = 1; .@i < 725; ++.@i)
        hateffect .@i,false;
    hateffect .@number,true;
    end;
    }

    
OnInit:
    bindatcmd "efc",strnpcinfo(3)+"::OnHatEffect";
    end;
}

[Error]: script:run_script_main: infinity loop !
[Debug]: Source (NPC): HATEFFECT (invisible/not on a map)

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  232
  • Reputation:   86
  • Joined:  06/30/18
  • Last Seen:  

*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) will
warn you if an infinite loop is detected.

The command will return the state of freeloop for the attached script, even if no
argument is provided.

Example:
	freeloop(1); // enable script to loop freely

	// be careful 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 rAthena do what it needs to do (socket, timer, process, etc.)
	}

	freeloop(0); // disable freeloop

	for ( .@i = 0; .@i < .@bigloop; .@i++ ) {
		dothis;
		// throw an infinity loop error
	}

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

6 hours ago, Winterfox said:
*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) will
warn you if an infinite loop is detected.

The command will return the state of freeloop for the attached script, even if no
argument is provided.

Example:
	freeloop(1); // enable script to loop freely

	// be careful 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 rAthena do what it needs to do (socket, timer, process, etc.)
	}

	freeloop(0); // disable freeloop

	for ( .@i = 0; .@i < .@bigloop; .@i++ ) {
		dothis;
		// throw an infinity loop error
	}

 

thank you again XD

Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...