Hi -
I understand this is not Lua related but I didn’t know where I should post this.
CODE:
a = math.random(10)
local total = display.newText (a + a, 100, 400, native.systemFont, 24 )
total:setTextColor (255, 255, 255)
RESULTS:
Results from a + a is displayed (18, for example, when I just ran it in the simulator)
QUESTION:
I put a math function (a+a) so why wasn’t there an error because you can’t “add” strings, right??
The first parameter in display.newText is a string:
display.newText( string, left, top, font, size )
Thanks in advance!
[import]uid: 45656 topic_id: 15170 reply_id: 315170[/import]