I want to make a function that uses global variables to summon images but I always get an error
here is my code:
local function warrior (event)
if getGlobal("Warrior") = 1
then
warrior = display.newImage('images/warrior.png',250,240)
end
end
localGroup:insert( warrior )
P.S. (I am using Director Class) [import]uid: 34097 topic_id: 16182 reply_id: 316182[/import]