Jump to content
Sign in to follow this  

Must be constant to work?

Recommended Posts

I have this function;

Func _GUICreateMain($WIDTH = $GUIWIDTH[0], $HEIGHT = $GUIHEIGHT[0],$X = -1,$Y = -1)

Now the syntax checker says;

MyScript.au3(35,30) : ERROR: syntax error

Func _GUICreateMain($WIDTH = $GUIWIDTH


I can't see what is wrong. $GUIWIDTH[0] is set long before this function (value; 275), so a idea have come to my mind.

Is it only constants variables you can use or am I'm missing something here?

Share this post

Link to post
Share on other sites

Exactly as you said: it must be constant.

I discovered the same this week too in my resource UDF:

Global Const $RT_RCDATA = 10

;Func _ResourceSetImageToCtrl($CtrlId, $ResName, $ResType = $RT_RCDATA) ; syntax error
Func _ResourceSetImageToCtrl($CtrlId, $ResName, $ResType = 10) ; corrected version
Edited by Zedna

Share this post

Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...