Jump to content

Just a check...


PantZ4
 Share

Recommended Posts

What is worng here:

$GUIHeigth[3] = (20*8)+(10*9)+90

The error:

Badly formated variable or macro.:

$GUIHeigth[3] = ((20*8)+(10*9))+90

$GUIHeigth^ ERROR

In my globals:

$NumberOfGUI = 4

Dim $GUIHeigth[$NumberOfGUI]

$GUIHeigth[0] = ...

$GUIHe...

and so on.

Thank you :whistle:

Link to comment
Share on other sites

  • Moderators

What is worng here:

$GUIHeigth[3] = (20*8)+(10*9)+90oÝ÷ Ù8^zºè¬'è®f­yÛÚ®&ê+§+£MúBz(-

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Does this error for you?

Dim $GUIHeigth[4];Can't have a $GUIHeight[4] = or it will error
$GUIHeigth[1] = 1
$GUIHeigth[2] = 2
$GUIHeigth[3] = ((20*8)+(10*9))+90

MsgBox(64, 'Info', $GUIHeigth[3])
C:\Documents and Settings\HP_Ejer\Skrivebord\AutoIt 3 Sricpts\Warcraft 3 - Developer Tool.au3 (217) : ==> Badly formated variable or macro.:

$GUIHeigth[3] = (20*8)+(10*9)+90

$GUIHeigth^ ERROR

Same :whistle:

Maybe look at my sricpt?

(Note that the program creates a ini file!)

Link to comment
Share on other sites

  • Moderators

I'm not trying to be rude... but you're crazy if you think I'm going to go through 500 lines of code.

Do some error checking... everywhere it fails... do an _ArrayDisplay() before it, and you'll find your problem that you need to look at.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

Actually, I'm sure it's that you are destroying the array... and to find out, all I did was open up SciTe and do a Find for $GUIHeigth, I went through all of them to find where you destroyed it (easily found when you are looking for an array with a bracket).

Below you will see that line 400 and 401 you made the array a regular variable.

Line 400: If ($Temp*25) < 55 Then $GUIHeigth = 55

Line 401: $LoadGUIWindow = GUICreate($GUITitle[3]&" - Load Chart",200,$GUIHeigth+20,-1,-1,$WS_CAPTION)

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

Also, if you run SciTe for syntax errors, you'll see that you forgot the "Then" at the end of some of your "If" statements:

>"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /prod /AU3Check /in "C:\Test.au3"

+>22:55:34 Starting AutoIt3Wrapper v.1.7.6

>Running AU3Check (1.54.6.0) params: from:C:\Program Files\AutoIt3

C:\Test.au3(9,16) : ERROR: syntax error

If $ScriptName Not

~~~~~~~~~~~~~~~^

C:\Test.au3(354,22) : ERROR: syntax error

If $ChartName Not

~~~~~~~~~~~~~~^

C:\Test.au3(404,14) : ERROR: syntax error

If $Temp Not

~~~~~~~~~^

C:\Test.au3(407,21) : ERROR: syntax error

If $ChartName Not

~~~~~~~~~~~~~~^

C:\Test.au3(408,84) : ERROR: syntax error

$LoadChartButton[$x] = GUICtrlCreateButton($ChartName,62.5,$TempHeigth,75,25

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Test.au3(409,38) : ERROR: syntax error

$TempHeigth = $TempHeigth + 35

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Test.au3(413,73) : ERROR: syntax error

$LoadCancel = GUICtrlCreateButton("Cancel",62.5,($Temp*25)+25,75,25)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Test.au3(418,33) : WARNING: $LoadCancel: possibly used before declaration.

Case $GUIMsg = $LoadCancel

~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Test.au3(426,3) : ERROR: missing EndIf.

EndSelect

^

C:\Test.au3(407,34) : REF: missing EndIf.

If $ChartName Not = "" Then

~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Test.au3(426,3) : ERROR: missing Next.

EndSelect

^

C:\Test.au3(405,17) : REF: missing Next.

For $x = 1 To

~~~~~~~~~~~^

C:\Test.au3(426,3) : ERROR: missing EndIf.

EndSelect

^

C:\Test.au3(404,26) : REF: missing EndIf.

If $Temp Not = 0 Then

~~~~~~~~~~~~~~~~~~~~~^

C:\Test.au3(418,33) : ERROR: $LoadCancel: undeclared global variable.

Case $GUIMsg = $LoadCancel

~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Test.au3 - 11 error(s), 1 warning(s)

!>22:55:35 AU3Check ended.rc:2

+>22:55:35 AutoIt3Wrapper Finished

>Exit code: 0 Time: 0.410

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Actually, I'm sure it's that you are destroying the array... and to find out, all I did was open up SciTe and do a Find for $GUIHeigth, I went through all of them to find where you destroyed it (easily found when you are looking for an array with a bracket).

Below you will see that line 400 and 401 you made the array a regular variable.

Line 400: If ($Temp*25) < 55 Then $GUIHeigth = 55

Line 401: $LoadGUIWindow = GUICreate($GUITitle[3]&" - Load Chart",200,$GUIHeigth+20,-1,-1,$WS_CAPTION)

No that $GUIHeigth is for the load box. That variable ($GUIHeigth[3]) we are talking about is for the set chart box.

But the most werid is that it does not do it first time. If you run the program and press the set chart button a couple of times, first there it gives you the error.

I have look thougth my script a few times and I can't see anything that destorys that array.

And the best of it; it is only used in three lines...

$GUIHeigth[3] = (20*8)+(10*9)+90
$GUIWindow[3] = GUICreate($GUITitle[3],$GUIWidth[3],$GUIHeigth[3],-1,-1,$WS_CAPTION)
GUICtrlCreateGroup("Set Chart",10,5,($GUIWidth[3]-20),($GUIHeigth[3]-15))

Nothing else uses that variable.

This is so wreid...

EDIT: Sorry my bad. You were rigth.

I had not created a local variable for the load box's heigth and therefore it overrided the global $GUIHeigth[] array...

Thank so much SmOke_N :whistle:

Edited by Mr. Zero
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...