Jump to content

Scite syntax erroring function call


Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :D

many thanks

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...