Help with composer.GetVariable()

Hello, I have a scene where a variable is set using:

composer.setVariable( gpslatitude, "test" ), 

and then in another scene I use

 print( composer.getVariable( "gpslatitude" ) )

but it returns nil, instead of “test”. Any ideas what I’m doing wrong?

Thanks.

Try this (“gpslatitude” in quotes):

composer.setVariable( "gpslatitude", "test" )

Best regards,

Tomas

Just tried that out, sadly it didn’t work although thanks for the suggestion.

This works for me:

local composer = require("composer") composer.setVariable( "gpslatitude", "test" ) print(" ------------ ") print( composer.getVariable( "gpslatitude" ))

Best regards,

Tomas

Thank you, working fine now, I must’ve made a mistake the first time.

Try this (“gpslatitude” in quotes):

composer.setVariable( "gpslatitude", "test" )

Best regards,

Tomas

Just tried that out, sadly it didn’t work although thanks for the suggestion.

This works for me:

local composer = require("composer") composer.setVariable( "gpslatitude", "test" ) print(" ------------ ") print( composer.getVariable( "gpslatitude" ))

Best regards,

Tomas

Thank you, working fine now, I must’ve made a mistake the first time.