quick syntax question

I’m pretty noob, working with ice but I’m sure this is a general Lua syntax issue, can someone tell me why this works:

[lua]travel = ice:loadBox( “travel” )
travel:storeIfNew( “_G.text1Var”, “2 Nights in Cancun!” )
print (travel:retrieve( “_G.text1Var” ) )[/lua]

but this does not:

[lua]_G.catVar = “travel”
travel = ice:loadBox( “travel” )
travel:storeIfNew( “_G.text1Var”, “2 Nights in Cancun!” )
print (_G.catVar…:retrieve( “_G.text1Var” ) )[/lua]

[import]uid: 96383 topic_id: 20534 reply_id: 320534[/import]

In line 4 you are trying to call a function on a string variable, I assume you wanted to do something like this:

  
\_G.catVar = ice:loadBox( "travel" )  
\_G.catVar:storeIfNew( "\_G.text1Var", "2 Nights in Cancun!" )  
print (\_G.catVar:retrieve( "\_G.text1Var" ) )  
  

[import]uid: 5833 topic_id: 20534 reply_id: 80570[/import]