View unanswered posts | View active topics It is currently Wed Jan 08, 2025 10:21 pm



Reply to topic  [ 28 posts ]  Go to page Previous  1, 2
 Ini Parser Source Code (C++) 
Author Message
User avatar

Joined: Thu Jul 19, 2007 11:31 am
Posts: 249
Location: Sweden, Hallstavik
Reply with quote
Post Re: Ini Parser Source Code (C++)
Bug fixes + Convenience Functions Update

This update fixes some minor bugs and adds three functions for data retrieving.

New Functions!
Code:
node* NodeSearchName( std::string name, node* target )
node* NodeSearchValue( std::string value, node* target )
node* NodeSearchVariableGroup( std::string group, node* target )


The usage is pretty straightforward:

Edit: How to check if it exists
Code:
node* Actor = NodeSearchName( "AddActor", root_of_some_file);
if ( Actor != NULL ) //ALWAYS DO THIS! Or you will get a Segmentation Fault error if it not exists.
{
 if ( Actor->value = "AHuman" )
   cout << "We has a actor somewhere!";
}



Download


Last edited by ChJees on Tue Dec 16, 2008 4:31 pm, edited 1 time in total.



Tue Dec 16, 2008 12:52 am
Profile WWW
User avatar

Joined: Thu Jul 19, 2007 11:31 am
Posts: 249
Location: Sweden, Hallstavik
Reply with quote
Post Re: Ini Parser Source Code (C++)
Critical Bugfix

Solves a bug where going one level down when parsing never added an item to the data tree!

Current Version 1.2
Download


Tue Dec 16, 2008 4:25 pm
Profile WWW
User avatar

Joined: Thu Jul 19, 2007 11:31 am
Posts: 249
Location: Sweden, Hallstavik
Reply with quote
Post Re: Ini Parser Source Code (C++)
Here is a WIP version of my Rte Inspector, it is not so stable. Crashes on .rte's with lots of includes is what i think.

Important, change the CortexCommandFolder under GlobalSettings to YOUR Cortex Command directory. In the Settings.ini file which comes with the program.

Not so informative yet, but it barely works :P. (Nowhere near the final version)

Image

Download


Tue Dec 16, 2008 9:50 pm
Profile WWW
User avatar

Joined: Thu Jul 19, 2007 11:31 am
Posts: 249
Location: Sweden, Hallstavik
Reply with quote
Post Re: Ini Parser Source Code (C++)
Minor Bugfix
Made it so that it parses / and * in a value.

Download


Wed Dec 17, 2008 3:55 pm
Profile WWW
User avatar

Joined: Sun Aug 31, 2008 5:22 pm
Posts: 156
Location: Finland
Reply with quote
Post Re: Ini Parser Source Code (C++)
Wow... Five posts. Wasn't a doublepost a bad thing?

On topic this could be handy for noobyer modders (like me) and our tests.
I hate to open cc all the time to wait it's says error, it's so slow.


Thu Dec 18, 2008 4:59 pm
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: Ini Parser Source Code (C++)
teh somebody wrote:
Wasn't a doublepost a bad thing?

I think only if the post is mere discussion. Bumpdating like this should be fine.


Thu Dec 18, 2008 9:49 pm
Profile
User avatar

Joined: Thu Jul 19, 2007 11:31 am
Posts: 249
Location: Sweden, Hallstavik
Reply with quote
Post Re: Ini Parser Source Code (C++)
Minor update (But important)

Made the parser behave more like Cortex Command's. (Ignore whitespace before first letter\number\symbol character.)

In other words, it would parse the Prison escape.rte Index.ini file correctly.

Download


Fri Dec 19, 2008 7:58 pm
Profile WWW
User avatar

Joined: Thu Jul 19, 2007 11:31 am
Posts: 249
Location: Sweden, Hallstavik
Reply with quote
Post Re: Ini Parser Source Code (C++)
Update for Code and Rte Inspector

A quite working and more useful Rte Inspector program is available now. At least it will now check if all Includes are right.

And a critical update to the source code which fixed a problem which made parsing certain Ini files impossible without crashing. (Try to parse or old Shotgun.ini in Ronin.rte with old parser versions.)

Pix
Rte Inspector

Downloads
Parser Source Code
Rte Inspector


Sat Dec 20, 2008 12:19 am
Profile WWW
User avatar

Joined: Sun May 18, 2008 8:30 am
Posts: 732
Reply with quote
Post Re: Ini Parser Source Code (C++)
Why isn't this stickied? Also, can't you use sourceforge to host this?


Sat Dec 20, 2008 5:57 am
Profile
User avatar

Joined: Thu Jul 19, 2007 11:31 am
Posts: 249
Location: Sweden, Hallstavik
Reply with quote
Post Re: Ini Parser Source Code (C++)
CandleJack wrote:
Why isn't this stickied? Also, can't you use sourceforge to host this?

I see no reason for it to be stickied :P. (I think mods do too)

Not big enough for Sourceforge i think. Since this is just another out of other 1000s of parsers.

And here is a new Rte Inspector version :3.

It will display a lot more data, but won't do any Instance checks so far.

Rte Inspector Download


Sat Dec 20, 2008 9:39 pm
Profile WWW
User avatar

Joined: Thu Jul 19, 2007 11:31 am
Posts: 249
Location: Sweden, Hallstavik
Reply with quote
Post Re: Ini Parser Source Code (C++)
Bug fix and new Rte Inspector update

This update fixes a bug which made a program crash when a empty value after a = was parsed. (Thanks to Whitty's overpowered mod for me to find that bug.)

Parser Source Update
Rte Inspector


Sun Dec 21, 2008 2:35 pm
Profile WWW
User avatar

Joined: Mon Feb 11, 2008 3:42 pm
Posts: 259
Reply with quote
Post Re: Ini Parser Source Code (C++)
You should probably rename the OP to "Ini Parser Source Code + RTE Inspector", since this is a bit more than just a bit of source code.

RTE Inspector looks intriguing. Will try it out ASAP.


Thu Dec 25, 2008 3:56 am
Profile
User avatar

Joined: Mon Jun 04, 2007 5:55 am
Posts: 1627
Location: Ohio
Reply with quote
Post Re: Ini Parser Source Code (C++)
I think this needs to not only be stickied but I think it needs to be bundled with all future CC builds as a free add-on tool


Thu Dec 25, 2008 5:15 am
Profile YIM WWW
Display posts from previous:  Sort by  
Reply to topic   [ 28 posts ]  Go to page Previous  1, 2

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.027s | 14 Queries | GZIP : Off ]