Scripts / LUA example script to output debugging info to a text file

Author
Message
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 14th Oct 2017 12:28 Edited at: 14th Oct 2017 12:33
Here's an example script that will generate a .TXT file containing path/waypoint X/Y/Z info for those who are not sure how to write debug stuff to a file. The "test.txt" file is written to the GG "Files" folder by default.



example output attached here:
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT

Attachments

Login to view attachments
Bolt Action Gaming
GameGuru Tool Maker
11
Years of Service
User Offline
Joined: 24th Oct 2013
Location: Harrisburg, PA (USA)
Posted: 20th Oct 2017 15:49
So.. wow, this is awesome. I had no idea we had lua's io functionality.
Gonna have to let this one stew, definitely, but you've opened some doors
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 20th Oct 2017 18:20
Super useful. Thank you.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 20th Oct 2017 20:08
no problem at all, actually the code in the _main section can be moved to the _init section. No idea why I put it in the main loop bit, probably just wrote it quickly while working on other stuff.
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT

Login to post a reply

Server time is: 2024-12-23 00:37:47
Your offset time is: 2024-12-23 00:37:47