A Problem That Has Been Killing Me ): !

Got it thanks!

Hi @TechGuy,

Runtime:addEventListener(“enterFrame”) should be 

Runtime:addEventListener(“enterFrame”, callYourFunctionHere)

Anyway you don’t need them for the above code.

Remove them. Also the removeEventListener—>Runtime:removeEventListener(“enterFrame”)

Come on Stay alive! :smiley:

burhan

Burhan you God <3 Tysm

I have 1 more quick question if you have time!
Everything works fine now, except for the part where it says click here to continue, 

right when i click it i get an error that says

?:0: attempt to concatenate global ‘sceneName’ (a nil value)

stack traceback

?: in function ‘gotoScene’

Any idea why i am getting this?

Hi,

You are trying to merge(concatenate) 2 or more strings to create a new string for your gotoScene.

e.g.

local MyMergeString = myString1…myString2

Either one or both string is nil therefore MyMergeString returns nil.

Do a print statement before the merge and see which is nil

e.g.

print(“Checking Strings :” , myString1 , myString2)

It this the line you are talking about?
local font = “HelveticaNeue” or native.systemFont;

Nope.

What is gotoScene code? Are still referring to the same code above?

Look for sceneName.

burhan

Ohh yea, gotoScene is this

function txt:tap(e)

        storyboard.gotoScene(“scene2”,{

            effect = “slideLeft”, – transition effect to implement

            time = 250 – duration of the transition effect in milliseconds

        });

    end

Also, the weird part is i don’t have anything named sceneName

do you have your scene2.lua in your root folder?

Yes i do, could the problem be pertaining to fact that i do not have any storyboard code in my scene2.lua yet?

Yes, You got it!  You need to have storyboard there. :smiley:

burhan

Ahah thank you for the lesson Burhan, so glad to pass this :stuck_out_tongue:

Hi @TechGuy,

Runtime:addEventListener(“enterFrame”) should be 

Runtime:addEventListener(“enterFrame”, callYourFunctionHere)

Anyway you don’t need them for the above code.

Remove them. Also the removeEventListener—>Runtime:removeEventListener(“enterFrame”)

Come on Stay alive! :smiley:

burhan

Burhan you God <3 Tysm

I have 1 more quick question if you have time!
Everything works fine now, except for the part where it says click here to continue, 

right when i click it i get an error that says

?:0: attempt to concatenate global ‘sceneName’ (a nil value)

stack traceback

?: in function ‘gotoScene’

Any idea why i am getting this?

Hi,

You are trying to merge(concatenate) 2 or more strings to create a new string for your gotoScene.

e.g.

local MyMergeString = myString1…myString2

Either one or both string is nil therefore MyMergeString returns nil.

Do a print statement before the merge and see which is nil

e.g.

print(“Checking Strings :” , myString1 , myString2)

It this the line you are talking about?
local font = “HelveticaNeue” or native.systemFont;

Nope.

What is gotoScene code? Are still referring to the same code above?

Look for sceneName.

burhan

Ohh yea, gotoScene is this

function txt:tap(e)

        storyboard.gotoScene(“scene2”,{

            effect = “slideLeft”, – transition effect to implement

            time = 250 – duration of the transition effect in milliseconds

        });

    end

Also, the weird part is i don’t have anything named sceneName

do you have your scene2.lua in your root folder?

Yes i do, could the problem be pertaining to fact that i do not have any storyboard code in my scene2.lua yet?

Yes, You got it!  You need to have storyboard there. :smiley:

burhan