1 2 | firstCrate = #allCrates[1] firstCrate.myName = "crate1" |
the error is not in firstCrate.myName = "crate1"
but in firstCrate = #allCrates[1]
what is #allCrates[1] ?
if allCrates is a table #allCrates is number of elements in it.
so not sure what you are expecting to get from #allCrates[1].
is it a multidimensional table ?
have you declared firstCrate somewhere ?
just try local firstCrate = #allCrates[1]
Thanks for the response..
it's an array defined as:
1 | local allCrates = {} |
will you be creating multiple crates in a loop ?
if you do like this
1 2 | local firstCrate = allCrates[1] firstCrate.myName = "crate1" |
notts_forest_,
the problem is the first line itself, even if you defined it as local.. or global.
1 2 | firstCrate = #allCrates[1] firstCrate.myName = "crate1" |
views:1369 update:2011/9/27 18:14:54
热门文章
GameCenter LeaderBoards and Achievements Enabled Through OpenFeint
send message and call to a person
Forum: Report Spam + PM
[INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[SOLVED] Director ERROR: Failed to execute new( params ) function on 'screen1'
Too many (200) local variables
Corona SVG Level Builder released. Drag and drop physics level editor with Inkscape and SVG.
Small bug in Collectible Items example
Pivot Joints and apparent elasticity
Can't make removeSelf() delayed
send message and call to a person
Forum: Report Spam + PM
[INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[SOLVED] Director ERROR: Failed to execute new( params ) function on 'screen1'
Too many (200) local variables
Corona SVG Level Builder released. Drag and drop physics level editor with Inkscape and SVG.
Small bug in Collectible Items example
Pivot Joints and apparent elasticity
Can't make removeSelf() delayed
相关文章
LinkedIn API
Integration of the Console into the Menu for the simulator
Welcome Eric Herrmann and Evan Kirchhoff
App deadlocks during a transition.to on Android
Shuffling table values
auto-rotation on Android
Garbage collection?
Riddenhurst >> An Epic Point and Click Adventure Game
An error occurred during the build!
Accelerometer in Simulator (+implementation idea)
Integration of the Console into the Menu for the simulator
Welcome Eric Herrmann and Evan Kirchhoff
App deadlocks during a transition.to on Android
Shuffling table values
auto-rotation on Android
Garbage collection?
Riddenhurst >> An Epic Point and Click Adventure Game
An error occurred during the build!
Accelerometer in Simulator (+implementation idea)
corona forums © 2003-2011