Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat
table question please - Gideros Forum

table question please

MoKaLuxMoKaLux Member
edited February 14 in General questions
I can't insert k, v in a table, could you please help me?
I have this code:
local world = r3d.World.new(0, gravityy, 0) -- 0, -9.8, 0
world.missiles = {}
 
stage:addEventListener(Event.ENTER_FRAME, function(e)
	if isshoot then shoot() end
end)
 
function shoot()
	local missile, missileobj = MISSILES(world, "3d_models/missiles", "missile03.obj", MISSILE_BIT, ENEMY_BIT)
	world.missiles[missile] = missileobj
	print(#world.missiles) -- TABLE ALWAYS EMPTY!
end
MISSILES returns missile and missileobj.
The table is always empty! Do you see anything wrong?
Thank you in advance for your help :)

my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
Tagged:
zip
zip
yt_06_gideros_r3d_shmup.zip
55K
table.png
601 x 411 - 21K

Comments

Sign In or Register to comment.