wookie Posted June 11, 2009 Posted June 11, 2009 Okay first off apologies for such a simple question, newbie and all i have searched and checked tutorials but cant seem to find an answer which prob means its very simple I am trying to call a function within a script but keep on getting bounced with syntax errors ; Randomize Func _spf() $rdlate = Random(50, 350, 1); $spx = Random(1,10,1); $spy = Random(1,10,1); EndFunc ;bag grab $bagcycle = 0 _spf MouseClick ("left", ($bex+$spx), ($bey+$spy), 1) Sleep($lx+$rdlate) MouseClickDrag ("left", ($bex+$spx), ($bey+$spy), ($invx+$spx), ($invy+$spy), (($rdlate/10)+$drag)) again apols and any help appreciatted
SuneC Posted June 11, 2009 Posted June 11, 2009 To call a function you have to remember the () after the name, just like in your declaration: _spf() To call the function. Remember that $rdlate, $spx and $spy have to be declared globally for that script to work.
wookie Posted June 11, 2009 Author Posted June 11, 2009 To call a function you have to remember the () after the name, just like in your declaration: _spf() To call the function. Remember that $rdlate, $spx and $spy have to be declared globally for that script to work. doh sorry only been at this for a day many thanks
SuneC Posted June 11, 2009 Posted June 11, 2009 If you didn't already know, you can also make parameters for your functions and have return values, but you can read more about that in the Help file
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now