in function 'func'
[string "compatibility.lua"]:32: in function <[string "compatibility.lua"]:31>
I have this piece of code and as soon as the text is displayed, it gives me the above mentioned error:
function youLoose()
local font2 = TTFont.new("billo.ttf", 20, " 1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
LooserText = TextField.new(font2, "You Loose
:P , Try AGAIN?")
LooserText:setPosition(100, 100)
stage:addChild(LooserText)
Timer = Timer.delayedCall(1000, removing)
end
function removing()
LooserText:getParent():removeChild(LooserText)
end
stage: addEventListener(Event.ENTER_FRAME, onEnter)
Comments
And if you comment out stage:addChild call does the error still happen?
Also don't override Timer class, as you won't be able to use it anymore
Are you sure you are not overriding LooserText somewhere else in the code to being some other value?
Another point that I noticed, that you provide cached symbols to TTFont, and then you use smilies and punctuation which are not provided as cached symbols, but this again most probably won't produce the error.
Is it really no more error text in there?
Can you prepare smallest example possible replicating the error and post here?
Sure, I will just post the concise example for the same with the exact error message.