Hey, i was wondering if someone could clarify a niggle for me.
If i have a function with 2 nested For loops, with 2 nested if-elseif statements within, would the program still run correctly (assuming the For's, if s and arrays were referencing seperate variables)?
From an english writing POV it would work well assuming that there was no way to call up either of the For's before they were needed.
pseudosyntax looks like this:
Code:
#
local function XYZ(arg1-3,...)
for k,v in pairs (array1) do
if strfind (arg1, v) then
--perform stuff
elseif
--otherStuff and
for k,v in pairs (array2) do
if strfind(arg1,v) do
diff stuff from before
elseif
even more diff
**Ends in all the right places**
Would this be an inefficient but working method? or would it fail from the start?