Jump to content

Syntax error using a matrix


Rapid
 Share

Recommended Posts

hello guys, I have this - 

Global $UserVals[4][4] = [[4.50,4.50,4.50,4.50],[12,10,8,6],[0,0,0,0],[60,50,40,0]]

global $matrix = 2
 HotKeySet("^z",Timer($UserVals[1,$matrix]))

and a timer function that recieves a value

 

now when I run it... it gives me this

 

error: syntax error
HotKeySet("^z",Timer($[1,

I cant call a specife value from a matrix?

Edited by Rapid
Link to comment
Share on other sites

The 2nd parameter in HotKeySet is the function name that you want to call. You cannot specify any parameter.

The syntax you used proceeds this way :

$ret = Timer($UserVals[1][$matrix])
HotKeySet("^z", $ret)

Is it what you want to do ?

 

It seems the correct syntax would be something like this, no ?

Global $UserVals[4][4] = [[4.50,4.50,4.50,4.50],[12,10,8,6],[0,0,0,0],[60,50,40,0]]
Global $matrix = 2

HotKeySet("^z","_CallTimer")

Func _CallTimer()
    Timer($UserVals[1][$matrix])
EndFunc



 

 

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