Results 1 to 5 of 5

Thread: finding errors in lua code?

                  
   
  1. #1
    DCEmu Regular Anonymous D's Avatar
    Join Date
    Jul 2006
    Posts
    414
    Rep Power
    70

    Default finding errors in lua code?

    At the moment i use a command script to launch lua player and my script. the only way i can get errors though is to quickly switch back to the command prompt before the script crashes, and try and printscreen it. this is incrediably annoying.
    is there some code , or setup that will log the erorrs to a text file for easy reading?

  2. #2

    Default

    Make a batch file that loads your script with luaplayer, then on the next line type "pause".

  3. #3
    DCEmu Coder splodger15's Avatar
    Join Date
    Jun 2006
    Location
    London
    Age
    34
    Posts
    4,123
    Rep Power
    95

    Default

    luaplayer changethis.lua
    pause

    change "changethis.lua" to your script you are running eg script.lua then save it as script.cmd or whatever

    PSN ID: splodger15

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

    psp

    in luaplayer 2.0:
    pcall (f, arg1, ...)
    --------------------
    Calls function f with the given arguments in protected
    mode. This means that any error inside f is not
    propagated; instead, pcall catches the error and returns
    a status code. Its first result is the status code (a
    boolean), which is true if the call succeeds without
    errors. In such case, pcall also returns all results from
    the call, after this first result. In case of any error,
    pcall returns false plus the error message.

  5. #5
    DCEmu Regular Anonymous D's Avatar
    Join Date
    Jul 2006
    Posts
    414
    Rep Power
    70

    Default

    thanks muchly for the quick replies

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
  •