lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Your problem seems like it's caused by thinking lua arrays work like C ones.
The first element in the array is index 1, not 0. So you're trying to pull
an element that doesn't exist.

----- Original Message -----
From: "Denis Lamarche" <brainwav@hotmail.com>
To: "Multiple recipients of list" <lua-l@tecgraf.puc-rio.br>
Sent: Sunday, August 05, 2001 3:36 PM
Subject: Lua Table


> Why do I keep getting an error when I do this.  Is there any way of doing
> it?  It keeps telling me that I am trying to index a global.
>
> [Lua]
> anim={ {fname="Bmp1.bmp",
>         time=100,
>         dx=10,
>         dy=12},
>
>        {fname="Bmp2.bmp",
>         time=300,
>         dx=123,
>         dy=0}
>       }
>
> anim[0].time=300  --This the line that I get the error on.
>
>
>
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>