PDA

View Full Version : lua coding help



Man
March 18th, 2007, 03:31
I have this snippet of code to make a player jump, and im trying to use square to run, X to jump, but when i try to run it in lua Devkit, it gives me thish error :'<eof>' expected near end on line 74, wich is the last line, and im not sure what that means or why its there, if there is anyone who could look over the code and tell me whats wrong, i would appreciate it alot, as i am a new "coder" im just learning, the jump code is credited to a tutorial at PSpmilionaires site here is the link : http://www.evilmana.com/tutorials/lua_snippet_jumping.php
i was just trying to modify it so that the box could run and jump, i made the run and jump bit up myself, and if it looks similar to other code, then too bad, its mine, its probably sloppy because i havent been doing this very long, any ways, here is that script :

dangee
March 18th, 2007, 08:52
this version works OK ?

yaustar
March 18th, 2007, 11:53
Fixed, you had an extra 'end' where it wasn't needed. Please indent your code properly though, it is a nightmare to read.

Man
March 18th, 2007, 18:05
thanks, but the way the script is set up, i guess that the faster movement screws with the jumoing physics, btw, it was just for fun anyways.