Jump to content
  • 0

Timer mistake, again.


Question

Posted (edited)

Could someone explain to me what did I do wrong about timer ?

Cause once I gave my item, I can't talk to him anymore.

Short part :

mes "[Rain]";
mes "Please come back later, I need to concentrate.";
set .@timer, gettimetick(2)-q_timer;
set .@wait, 9000-.@timer; //15 minutes
set refat,1;
close;

if((refat == 1 || .@timer < 9000)){
mes "[Rain]";
mes "Please come back later, I need to concentrate.";
close;
}else{
set rain,2;
mes "[Rain]";
mes "Oh, it's you !";
next;
mes "[Rain]";
mes "Here for you.";
getitem 6090,1;
close;

Edited by Auryn

4 answers to this question

Recommended Posts

Posted
set .@timer, gettimetick(2)-q_timer; // q_timer is not defined
set .@wait, 9000-.@timer; // variable .@wait is not used
set refat,1;
close;
// needs closing curly
if((refat == 1 || .@timer < 9000)){ // should be &&, and .@var is not defined
close;

Posted (edited)

Ok, I think I get it.

So, is it correct this way ?

mes "[Rain]";
mes "Reviens me voir plus tard s'il te plait, j'ai besoin de me concentrer.";
set q_timer, gettimetick(2);
set refat,1;
close;
}
if((refat == 1 && .@timer < 9000)){
mes "[Rain]";
mes "Reviens me voir plus tard s'il te plait, j'ai besoin de me concentrer.";
close;
}else{ // (...)

Edited by Auryn

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