mIRC Home    About    Download    Register    News    Help

Print Thread
#189121 04/11/07 03:43 AM
Joined: Aug 2007
Posts: 334
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Aug 2007
Posts: 334
When I try to make a script with a goto loop it says

Quote:
* goto 'Reload' not found


this is a long time bug

or at least i think its a bug? 99% sure. confused


This is not the signature you are looking for
Joined: Nov 2007
Posts: 8
I
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
I
Joined: Nov 2007
Posts: 8
or you have to formatting wrong

Quote:
reload

Quote:
:reload


Maybe? Just a thought wink


If money doesn't grow on trees, why do banks have branches?
Joined: Dec 2002
Posts: 503
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
Show us your code, and we'll tell you what's wrong.

Bekar #189124 04/11/07 04:04 AM
Joined: Aug 2007
Posts: 334
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Aug 2007
Posts: 334
Code:
    :Reload
    if (%prcnt <= 100) {
      drawrect -f %pbarwin 12 1 %lo 0 %inc.x %h
      inc %prcnt 
      inc %lo %inc.x
      .timer -m 1 50 goto Reload 
    }

i could use a while loop but i wouldnt get the same result


This is not the signature you are looking for
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
/goto only works locally (ie. within the scope of the alias/event definition that it's in). /timer's command parameter is executed in it's own scope, not the one that the original /timer command was called from so the error is the correct behaviour: there really isn't a "reload" label as far as that /goto command is concerned.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Oct 2003
Posts: 214
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 214
Won't work, goto marks are only script internal, if you use it with a timer it won't go back to that position inside the script

You can, instead make use of this:
a) A /sleep alias that freezes/pauses the script or so
b) The timer(s) to do the drawrect
c) the whilefix.dll


one step closer to world domination
Joined: Dec 2002
Posts: 503
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
Umm, there is no /sleep command..

But the other ides are good. wink

Bekar #189128 04/11/07 05:11 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
It was specified as /sleep alias

RusselB #189129 04/11/07 05:12 AM
Joined: Dec 2002
Posts: 503
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
Ah, missed that bit :P

Bekar #189144 04/11/07 12:26 PM
Joined: Aug 2007
Posts: 334
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Aug 2007
Posts: 334
thx, i guess


This is not the signature you are looking for
Joined: Mar 2006
Posts: 395
T
Pan-dimensional mouse
Offline
Pan-dimensional mouse
T
Joined: Mar 2006
Posts: 395
wouldnt using signals be the best option here?


[02:16] * Titanic has quit IRC (Excess Flood)

Link Copied to Clipboard