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

table question please

MoKaLuxMoKaLux Member
edited February 2020 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 :)

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

Comments

Sign In or Register to comment.