Codea won’t let me run my app due to invalid syntax. One thing it is complaining about is this, in my main file:
setup = AppManager.initialize
draw = DrawingManager.drawFrame
In a file called AppManager, I have a table called AppManager that does in fact have a function called initialize in it. However, the syntax checker doesn’t seem to like function references like this, and responds with “attempt to index global AppManager (a nil value)”. There is also a file called DrawingManager with a table called DrawingManager with a drawFrame function inside of it, but that doesn’t seem to be a problem for the syntax checker.
Another thing it complains about is this:
DebugManager = {
Log = {
appendToLog = function(data)
table.insert(log, {["type"] = "normal", ["data"] = data, ["time"] = os.date("!%c")})
print(log[table.maxn(log)].time.." : "..log[table.maxn(log)].data)
end
appendWarningToLog = function(data)
table.insert(log, {["type"] = "warning", ["data"] = data, ["time"] = os.date("!%c")})
print(log[table.maxn(log)].time.." : "..log[table.maxn(log)].data)
end
}
}
It says that I am not closing the curly brace of the Log table (though this one may be my fault, may have missed a bracket somewhere. This syntax checker is just bothering me, it won’t let me play my app. Can I disable it?