Jump to content
  • 0

Help pls with one script


OmarAcero

Question


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  71
  • Reputation:   1
  • Joined:  10/13/12
  • Last Seen:  

I had this error:   HERE    ( run_script: infinity loop ! )

----

Friends, I think I almost got it after studying all the code, I discovered where it originates:   

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

post-8816-0-30165600-1424199527_thumb.jpg

Edited by OmarAcero
Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1282
  • Reputation:   393
  • Joined:  02/03/12
  • Last Seen:  

use...

freeloop(1);

or with eAthena...

if ( ! ( set(.@l,.@l+1) % 600) )
	sleep2 1;
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...