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:1367 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
相关文章
BSOD Can't De-Authorize Corona
Any way to create a tree of groups?
OpenFeint Dashboard
Object apply force/impulse on collision
Kill one audio loop and play another
Creating icons
How To Move Object On Equation Not Specific Path ?
problem sending mail from app using system.openURL
Line spacing - multi Line Text Field
Simple Audio RecorderSound audio coming out of earpiece, not speaker
Any way to create a tree of groups?
OpenFeint Dashboard
Object apply force/impulse on collision
Kill one audio loop and play another
Creating icons
How To Move Object On Equation Not Specific Path ?
problem sending mail from app using system.openURL
Line spacing - multi Line Text Field
Simple Audio RecorderSound audio coming out of earpiece, not speaker
corona forums © 2003-2011