Widget

May I know to solve the problem of main.lua:13:’=’ expected near ‘local’? thanks.

What is line 13 of main.lua?

Please show us your code…

However, I’m guessing that on or before line 13 you did this (pseudo code):

local abc = display.newImage() -- or newImageRect()

You created some new display object and assigned it to a local.  However, you didn’t have the right name or path for the texture, so the object didn’t get created and then local assign failed.

OR you did this

local require "bob"

I do that all the time.  I’m so used to assigning the return from require to a local that I goof up for those that don’t and still type local first.

Some day, I’m going to go through and write a list of likely causes for common error messages, but not today.

Nonetheless, if you want help, please post your code.

What is line 13 of main.lua?

Please show us your code…

However, I’m guessing that on or before line 13 you did this (pseudo code):

local abc = display.newImage() -- or newImageRect()

You created some new display object and assigned it to a local.  However, you didn’t have the right name or path for the texture, so the object didn’t get created and then local assign failed.

OR you did this

local require "bob"

I do that all the time.  I’m so used to assigning the return from require to a local that I goof up for those that don’t and still type local first.

Some day, I’m going to go through and write a list of likely causes for common error messages, but not today.

Nonetheless, if you want help, please post your code.