Jump to content
  • 0

buildin_sleep2 error


Kakaroto

Question


  • Group:  Members
  • Topic Count:  99
  • Topics Per Day:  0.02
  • Content Count:  623
  • Reputation:   94
  • Joined:  05/11/12
  • Last Seen:  

I am getting error messages in the horror script toy factory, can anyone help me?

Follow script:

1@xm_d,1,5,3    script    #bssk03    CLEAR_NPC,{
    end;
OnStart:
    .@event$ = instance_npcname( strnpcinfo(0) ) + "::OnMyMobDead";
    killmonster 'xm_d_map$, .@event$;
    while (1) {
        getunitdata 'celene_id, .@data;
        .@x = .@data[UMOB_X] + rand(1,20) - 10;
        .@y = .@data[UMOB_Y] + rand(1,20) - 10;
        monster 'xm_d_map$,.@x,.@y, "#f_w_1",3038,1, .@event$;// HIDDEN_MOB7
        .@mon_num++;
        if (.@mon_num > 20)
            break;
        sleep2 200;
    }
    sleep 6000;
    killmonster 'xm_d_map$, .@event$;
    end;

OnMyMobDead:
    end;

OnInstanceInit:
    hideonnpc instance_npcname( strnpcinfo(0) );
    end;
}

 

Print:

gTfQhbL.png

 

 

I appreciate who can help me.

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  505
  • Reputation:   126
  • Joined:  04/04/16
  • Last Seen:  

Just replace sleep2 with sleep since there's no attached rid when the sleep2 is called.

It was because of this commit Git Hash: a8e4c83

  • Upvote 2
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  249
  • Reputation:   72
  • Joined:  10/20/12
  • Last Seen:  

Just replace sleep2 with sleep. You don't have an attached player, nor you'd need one.

Another suggestion would be to  change while (1)  to for ( .@mon_num = 0; .@mon_num < 20; .@mon_num++ ). Good luck!

(Oh Technoken was quicker than me :D)

  • Upvote 1
  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  99
  • Topics Per Day:  0.02
  • Content Count:  623
  • Reputation:   94
  • Joined:  05/11/12
  • Last Seen:  

Thank you so much!
 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  505
  • Reputation:   126
  • Joined:  04/04/16
  • Last Seen:  

@Jey XD guess that's need to be updated too on the repo.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  249
  • Reputation:   72
  • Joined:  10/20/12
  • Last Seen:  

@Technoken why? I think the error helps to differentiate both types.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  505
  • Reputation:   126
  • Joined:  04/04/16
  • Last Seen:  

@Jey I was talking about the Horror Toy Factory script. :P

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  249
  • Reputation:   72
  • Joined:  10/20/12
  • Last Seen:  

Oh didn't thought it is in our repo. Thanks for mentioning it.

Fixed in https://github.com/rathena/rathena/commit/b275412bcc1251a1c9214b8cdafdf40323c2b0f7

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