Load and unload gungame modules and other debugging stuff

Ask questions and share info about GunGame 5

Load and unload gungame modules and other debugging stuff

Postby Neka » Wed Sep 26, 2012 4:49 am

Hello!
How to load and unload GunGame modules without reloading gungame itself?
What debugging tools or tips you're using while write modules by yourself?
Last edited by Neka on Wed Sep 26, 2012 5:32 am, edited 1 time in total.
Neka

Private
Private
 
Posts: 40
Joined: Thu Sep 01, 2011 4:22 am

Postby satoon101 » Wed Sep 26, 2012 4:58 am

To load and unload included/custom addons, simply use the addons variable to set to 1/0. However, currently once an addon is loaded into memory, it will not be re-imported when it is reloaded. Instead, the instance itself stays in memory. I do plan on revisiting that structure to fix that issue, but have not done that as of yet.

As for debugging, it all depends on what I am trying to do. Using es.dbgmsg(0, <text>) helps a lot to make sure the code is functioning properly, but that requires direct access to the server's console. If you do not have that, you can simply use es.msg(<text>), which will print in the chat area to all players on the server.

Satoon
satoon101

Site Admin
Site Admin
 
Posts: 1055
Joined: Thu Oct 09, 2008 4:27 pm

Postby Neka » Wed Sep 26, 2012 5:28 am

I have full access (software and hardware) to my server. Using es.msg to print out debug info looks like the same as into php, but even php have xdebug for more detail debugging (breakpoints and etc.). Have python, especially ES, this sort of tools for debugging?
Neka

Private
Private
 
Posts: 40
Joined: Thu Sep 01, 2011 4:22 am



Return to General Discussion

Who is online

Users browsing this forum: No registered users and 21 guests

cron