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
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!
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


Sign In or Register to comment.