Hello. I'm trying to build simple scene through modules. Working code looks like this:
require ("bg1_static") require ("bg2_move") require ("bg3_move") require ("player_run") require ("bg4_move")
No errors allowed. But if i try to set position for "player_run" through function:
require ("bg1_static") require ("bg2_move") require ("bg3_move") local player = require ("player_run") player.x = 100 player.y = 100 require ("bg4_move")
This leads to an error in the attach. I'm totally noob in Corona SDK, Lua, and programming as is, so i need to understand what kind of error this is - lack of Lua knowledge (minimal language basis for example), Corona SDK functions or both? Can someone explaind what exactelly wrong and give advice to learn direction which related with module builds? Thanks.