Results 1 to 4 of 4

Thread: lua coding help

                  
   
  1. #1
    DCEmu Pro Man's Avatar
    Join Date
    Dec 2005
    Location
    Canada
    Posts
    929
    Rep Power
    72

    Default lua coding help

    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/lu...et_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 :

  2. #2
    DCEmu Pro dangee's Avatar
    Join Date
    Feb 2007
    Posts
    531
    Rep Power
    65

    Default beware of elseifs

    this version works OK ?

  3. #3
    GP2X Coder/Moderator
    Join Date
    Jan 2006
    Posts
    1,678
    Rep Power
    83

    Default

    Fixed, you had an extra 'end' where it wasn't needed. Please indent your code properly though, it is a nightmare to read.

  4. #4
    DCEmu Pro Man's Avatar
    Join Date
    Dec 2005
    Location
    Canada
    Posts
    929
    Rep Power
    72

    Default

    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •