Jump to content

Arrays


Slythfox
 Share

Recommended Posts

EDIT: I fixed it. Apparently you have to declare the max size of the array (ex: Dim $Data[3]).

I have something like this:

#include <array.au3>
Dim $Data

$Data[1] = "foo"
$Data[2] = "bar"
Msg(0, $Data[1], $Data[2])

I get this "Badly formated variable or macro" error.

What am I doing wrong?

Edited by Slythfox
Link to comment
Share on other sites

  • Developers

EDIT: I fixed it. Apparently you have to declare the max size of the array (ex: Dim $Data[3]).

I have something like this:

#include <array.au3>
Dim $Data

$Data[1] = "foo"
$Data[2] = "bar"
Msg(0, $Data[1], $Data[2])

I get this "Badly formated variable or macro" error.

What am I doing wrong?

I get a totally different error:

C:\Development\winutil\AutoIt3\programs\test\test.Au3(6,26) : ERROR: Msg(): undefined function.
Msg(0, $Data[1], $Data[2])
~~~~~~~~~~~~~~~~~~~~~~~~~^

But you need to DIm your Array like this; Dim $data[3]

:)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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