Jump to content
  • 0

Question

Posted

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)

2 answers to this question

Recommended Posts

  • 0
Posted
*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
  • 0
Posted
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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...