KeyValue formatter reader/writer

Grab your favourite IDE and tinker with the innards of game engines

Re: KeyValue formatter reader/writer

Postby coder0xff on Wed Jul 28, 2010 6:14 am

Christ, I can't seem to do anything right can I?

I've added the file to the zip. Sorry 'bout the wait. Was on vacation.
User avatar
coder0xff
Veteran
Veteran
 
Joined: Fri Jun 13, 2008 1:51 am

Re: KeyValue formatter reader/writer

Postby omnicoder on Wed Jul 28, 2010 5:45 pm

It loads fine but something seems a bit odd with saving. The output file ends with "edito" and is cut off without the rest of the bottom editor section. I manually appended the missing part but hammer gave me an out memory error about expecting a bracket.

In the original map
Code: Select all
    editor
    {
        "color" "220 30 220"
        "visgroupshown" "1"
        "visgroupautoshown" "1"
        "logicalpos" "[0 10000]"
    }
}
cameras
{
    "activecamera" "-1"
}
cordon
{
    "mins" "(-1024 -1024 -1024)"
    "maxs" "(1024 1024 1024)"
    "active" "0"
}

In the output file
Code: Select all
     edito


I'm assuming using the ToStream method of Valvemap was the correct way to write files?
Image
If only the future implemented IForeseeable...
"whats threading? does it have to do with strings?" - stegarootbeer
User avatar
omnicoder
Been Here A While
Been Here A While
 
Joined: Sun Feb 07, 2010 8:35 am

Re: KeyValue formatter reader/writer

Postby coder0xff on Wed Jul 28, 2010 9:30 pm

ToStream, yeah. I'll PM z@c and ask him to have a look at this thread. That certainly is strange though. Let us know if you figure out what's wrong with it.

You sure the stream is getting flushed?
User avatar
coder0xff
Veteran
Veteran
 
Joined: Fri Jun 13, 2008 1:51 am

Re: KeyValue formatter reader/writer

Postby omnicoder on Wed Jul 28, 2010 9:47 pm

Ah yes it was the stream not being flushed, thanks. I guess I was under the assumption that if it was going to write the entire file flushing itself that partway through a word wouldn't be the place it would have stopped. Seems to be working fine now.
Image
If only the future implemented IForeseeable...
"whats threading? does it have to do with strings?" - stegarootbeer
User avatar
omnicoder
Been Here A While
Been Here A While
 
Joined: Sun Feb 07, 2010 8:35 am
Previous

Return to Programming

Who is online

Users browsing this forum: No registered users