PantZ4 0 Posted August 31, 2007 I have this function; Func _GUICreateMain($WIDTH = $GUIWIDTH[0], $HEIGHT = $GUIHEIGHT[0],$X = -1,$Y = -1) $GUI[0]=GUICreate($GUITITLE[0],$WIDTH,$HEIGHT,$X,$Y,$WS_POPUP,$WS_EX_TOPMOST+$WS_EX_TOOLWINDOW) EndFunc 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
Zedna 288 Posted August 31, 2007 (edited) 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 August 31, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Share this post Link to post Share on other sites
PantZ4 0 Posted August 31, 2007 (edited) Damn. Thanks Zedna . Edited August 31, 2007 by Mr. Zero Share this post Link to post Share on other sites