- I used Text wrangler and made a file call main.lua
- Save it on my desktop in a folder called TestCorona
- On main.lua i have the following code.
local textobj = display.newText(“Hello World”, 50, 50, nil, 24)
textobj:setTextColor(255, 255, 255)
- Launch Corona Simulator
- Continue Trial
- >Open Project
- Choose Folder
NOTHING , I dont see hello world printed.
I also tried 7b. Choosing the main.lua file and nothing. [import]uid: 6500 topic_id: 9646 reply_id: 309646[/import]
I get this error by the way.
(/Users/Library/Application Support/Corona Simulator/testAgain-3A76E2DADE54B132DE376FF8D0A2A946)
Syntax error: /Users/Desktop/testAgain/main.lua:1: unexpected symbol near ‘?’
I dont have a question mark though anywhere
[import]uid: 6500 topic_id: 9646 reply_id: 35144[/import]
Hi Artofacks1,
I’m not 100% sure, but it appears to me that the problem is with the “Nil” selection.
I think you are calling the font to be nil.
Try replacing nil with this “native.systemFontBold”
You can also opt to remove the word Bold.
Here is a sample of code, try copying and pasting into your project to see if you get a better result.
[lua]local textMiniArrow = display.newText("textMiniArrow:setTextColor(255, 255, 255)[/lua] [import]uid: 50045 topic_id: 9646 reply_id: 35147[/import]
Change it to this:
local textobj = display.newText("Hello World", 50, 50, nil, 24)
textobj:setTextColor(255, 255, 255)
Different quote characters.
[import]uid: 5833 topic_id: 9646 reply_id: 35148[/import]
Thanks bud! It was the quotes. [import]uid: 6500 topic_id: 9646 reply_id: 35152[/import]
No worries, I only noticed as the syntax highlighting was different in the post than what I expected. [import]uid: 5833 topic_id: 9646 reply_id: 35201[/import]