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:1368 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
相关文章
Game is SLOW when touch and holding screen
Android graphics get messed up
request for polygon display objects (vector objects)
event.currentTarget for Runtime:addEventListener, and group:addEventListener
A new Non-physics based game made possible with new game engine created with Corona!
PVZ texture format support
Beach Ball Mayhem Beta
Best Way To Learn Code?
Invalid memory access of location 0x44 eip=0x584ca This is what I get when I try to build for device
ObjectsByName.lua - Garbage-collection friendly name-object & object-name mapping facility.
Android graphics get messed up
request for polygon display objects (vector objects)
event.currentTarget for Runtime:addEventListener, and group:addEventListener
A new Non-physics based game made possible with new game engine created with Corona!
PVZ texture format support
Beach Ball Mayhem Beta
Best Way To Learn Code?
Invalid memory access of location 0x44 eip=0x584ca This is what I get when I try to build for device
ObjectsByName.lua - Garbage-collection friendly name-object & object-name mapping facility.
corona forums © 2003-2011