Error: can't find func

06/08/2014 22:36 goldenapple007#1
not sure that the error is that, but it's something simular.
I keep getting it at the last part of the script, where it needs to go back to a Func that's placed higher in the code.
I don't want to share the code, unless you're a trusted member.
my script looks like this:

Func 1()
xxxx
xxxx
xxxx
2
;goes to func 2

Func 2()
xxxx
xxxx
xxxx
3
;goes to func 3

Func 3()
xxxx
xxxx
xxxx
4
;goes to func 4

Func 4()
xxxx
xxxx
2
; goes back to func 2 , here I get the error.
06/08/2014 23:15 VisionEP1#2
Quote:
Originally Posted by goldenapple007 View Post
not sure that the error is that, but it's something simular.
I keep getting it at the last part of the script, where it needs to go back to a Func that's placed higher in the code.
I don't want to share the code, unless you're a trusted member.
my script looks like this:

Func 1()
xxxx
xxxx
xxxx
2
;goes to func 2

Func 2()
xxxx
xxxx
xxxx
3
;goes to func 3

Func 3()
xxxx
xxxx
xxxx
4
;goes to func 4

Func 4()
xxxx
xxxx
2
; goes back to func 2 , here I get the error.
1. u coud share the functions call code
2. what the hell is this?
seems like it coud be done all in 1 function(maybe recursive)
06/08/2014 23:44 alpines#3
Nobody will be able to reproduce the problem with that pseudocode.
Why don't you try to isolate the problem in a new script?
06/09/2014 11:26 goldenapple007#4
Quote:
Originally Posted by alpines View Post
Nobody will be able to reproduce the problem with that pseudocode.
Why don't you try to isolate the problem in a new script?
after I added the code here , I found the mistake.
I forgot a $ before a variable...
I shouldn't code that late ( acctualy you can't call that coding, It's just copy pasterino)
I'm gonna run it now, and see if it works ...
Takes a long time to test cus I need 3 vm's for it :(

edit: tested and works , infinity loops =D , it's a script to level my League of legends account(s)
I added a stop button, don't worry.
06/09/2014 15:22 Paraly#5
Try this, your script will be paused with F5 and you can exit the script with F6

PHP Code:
#NoTrayIcon

Global $Pause
HotKeySet
("{F5}","_Pause")
HotKeySet("{F6}","_Exit")


While 
1
    _Func1
()
    
_Func2()
    
_Func3()
    
_Func4()
WEnd

Func _Pause
()
    
$Pause Not $Pause
    
While $Pause
        ToolTip
("Script paused..",@DesktopWidth 0.5, @DesktopHeight 0.05)
        
Sleep(75)
    
WEnd
EndFunc

Func _Exit
()
    
Local $i 5
    
Do
        
ToolTip("Script will exit in " $i " Seconds..",@DesktopWidth 0.5, @DesktopHeight 0.05)
        
Sleep(1000)
        
$i -= 1
    Until $i 
0
    
Exit
EndFunc