hi all
i hope if some one can help me, i am new with lua and i try to understand what going on with my simple code
this is my code
if i run it i have a debbug -- >
any help ? any one know why ?
i hope if some one can help me, i am new with lua and i try to understand what going on with my simple code
this is my code
Lua:
function win(classMates , winners)
res = {}
for i=1,#winners do
for j=1,#classMates do
print(3)
if winners == classMates[j] then res = 1 else res = 0 end
print(res)
end
end
end
classMates = {"frank" , "alex" , "soli"}
winners = {"lora" , "frank" , "sandra" ,"alex"}
print(winners(classMates,winners))
if i run it i have a debbug -- >
Code:
lua: [string "<eval>"]:15: attempt to call global 'winners' (a table value)
stack traceback:
[string "<eval>"]:15: in main chunk
any help ? any one know why ?