Need help for my loader...
Posted: Wed Apr 26, 2017 12:45 pm
Hello everyone,
I am making a custom level loader, but when I run it, it gives me an error saying "= expected near ..."
My code:
The exact error is: levelLoader.lua:16: '=' expected near 'Map'
Can someone help me fix this problem?
Thanks in advance,
- Xaaf Code
I am making a custom level loader, but when I run it, it gives me an error saying "= expected near ..."
My code:
Code: Select all
Level = {}
function Level:get(map)
if map ~= nil then
level = map
else
level = "../levels/levelCrash"
end
return level
end
function Level:draw(level)
Map = require level
Map:create()
end
return Level
Can someone help me fix this problem?
Thanks in advance,
- Xaaf Code