For loops like:
[lua]for i = x, y do … end[/lua]
should I be declaring
[lua]local i[/lua]
beforehand?
And when constructing functions like:
[lua]local function someAction (x, y)[/lua]
is there a reason not to use x and y throughout that function, since they’re not declared as local? Would it be better to transfer them to a local in the function, such as:
[lua]local function someAction (x, y)
local valx = x
local valy = y[/lua]
and then use valx and valy for the rest of the function? [import]uid: 1560 topic_id: 12250 reply_id: 312250[/import]