Currently the developers are putting their own money into JC2-MP to keep the servers online.

Please take a few seconds of your time and disable your AdBlock plugin for our website.

Ad revenue is not going to developers, it is used purely for covering our hosting costs.

 

You are also free to donate, which removes all ads from our website!

Patch 0.3 was just released! Full changelog here: https://t.co/4A50m6IKen

3 months ago

August 23, 2017, 11:04:47 pm

Author Topic: Error reporting A.K.A. "Script does not work for me :\"  (Read 4196 times)

Eraknelo

  • Sr. Member
  • ****
  • Posts: 310
    • View Profile
Error reporting A.K.A. "Script does not work for me :\"
« on: December 22, 2013, 11:11:50 am »
I just wanted to make this quick post about how to report errors.

Instead of going to the topic of the script and saying "It's not working", please provide some useful information.

The most useful information you could give is what other scripts are loaded, and if there's an error in the server or game console.

How do I open the game console?
The game console can be opened by the tilde (~ / `) key on US-international keyboard layouts. You can also press F4, this should work for all keyboard layouts.

Where is the server console?
The server console is the black screen of text that shows when you start a server.

How do I identify the error?
Client
Errors in the game console are marked in red. If th error is too big for the console, drag it's edges like you would in a regular Windows environment to resize the windows.
To get the full error message, go to the directory where your Just Cause 2 Multiplayer Mod is installed (Often in C/D:\Program Files (x86)\Steam\SteamApps\common\Just Cause 2 - Multiplayer Mod)
And open the file called "client.log"
The most recent messages appear in the bottom, so scroll all the way down.

Here's an example of an error message:
Code: [Select]
01:31:43 | [error] | Lua error in module killfeed when running event PlayerDeath: [string "class 'Killfeed'..."]:35: attempt to index field '?' (a nil value)
01:31:43 | [error] | Callstack:
01:31:43 | [error] |    local noKillerMessage = self.no_killer_msg[args.reason][args.id]:35: in function <function Killfeed:PlayerDeath( args ):19>

Note that the error message says "Lua error in module killfeed". This is also important, as a developer will probably only want error reports from THEIR script. So check if the module name is the one you are targeting.

Server
Server errors appear in the previously discussed server console.
To copy an error in the server console, you have to right click the title bar, click "Edit" and then click "Mark"


Then mark the area of the error, and press the Enter key.
It is now in your clipboard, and you can Ctrl + V it into any text area.

List of installed scripts
A list of scripts is always handy in case there is no server or client error. It can be used to check compatibility.
This will of course mean more work for the developer, as they will probably have to test compatibility for each and every script you have installed. Not to mention finding them first.

Alright, that's all I had to say! If we can all just follow this instead of "Doesn't work", I'm sure we can create much better scripts altogether.

Thanks for reading!
« Last Edit: January 26, 2014, 08:32:01 pm by Eraknelo »

TheDragonich

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Error reporting A.K.A. "Script does not work for me :\"
« Reply #1 on: December 24, 2013, 07:59:10 pm »
What can I do, if the game console won't appear after pressing ~

Eraknelo

  • Sr. Member
  • ****
  • Posts: 310
    • View Profile
Re: Error reporting A.K.A. "Script does not work for me :\"
« Reply #2 on: December 24, 2013, 10:00:27 pm »
What can I do, if the game console won't appear after pressing ~
You can use this method to open the log file, it has the same information as the in-game console:
To get the full error message, go to the directory where your Just Cause 2 Multiplayer Mod is installed (Often in C/D:\Program Files (x86)\Steam\SteamApps\common\Just Cause 2 - Multiplayer Mod)
And open the file called "client.log"

oeed

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Error reporting A.K.A. "Script does not work for me :\"
« Reply #3 on: December 25, 2013, 10:22:21 am »
What can I do, if the game console won't appear after pressing ~
In addition to what Eraknelo said, I believe pressing F6 does the same. (I'm about 90% sure)