Let me explain about your error message for a bit.
Syntax errors mean exactly what they say; there's something wrong with the syntax of your code, in this case, putting "end"s at the wrong places. "end" is only used to end a function or a loop, not to end a statement or command.
<eof> means "end of file", as in, the end of your script or, the end of a file that you are reading.
Each error statement usually have this syntax :
Code: Select all
[Type of Error]: [File of which the error originated]:[Line number]: [Error message]
And there are also some things in the traceback that is important :
Code: Select all
Traceback
[File of which the error originated]: In function [Function of which the error originated] at line [Line number]
.
.
.
[C]: In function [the function that you called to produce the error, for example, you required a lua file with an error in it]
.
.
.
[C]: In function xpcall
And, please use tabbing (either pressing the tab key while typing in a code editor, or pressing 4 spaces) inside each function/loop/statement to clean up and make it easier to read. Example :
Code: Select all
-- Instead of
if collide(rectA, rectB) then
explodeObjects(rectA,rectB)
end
-- Do
if collide(rectA, rectB) then
explodeObjects(rectA,rectB)
end
That's all.
Currently designing themes for WordPress.
Sometimes lurks around the forum.