PDA

View Full Version : Very quick (and easy) SDK question.



ceenda
04-01-2004, 01:39 PM
[EDIT - mods, this should actually be in 3rd-party subforum shouldn't it... :( ]

Mods, if this is in the wrong forum could you move it please? I couldn't see anywhere better to post an SDK question.

In the File I/O section it states:



"LWSAVE_STR( ss, strbuf )

Write a string. In ASCII mode, the string may be contained in double quote marks (which will be removed when the string is later read by the LWLoadState readStr function)."

So when I call:

LWSAVE_STR(save, "BLA BLA BLA \n");

It should just write:
BLA BLA BLA
in the file.

However, what I get is:
"BLA BLA BLA"
in the extra quotes which I assumed would be taken out by LWLoadState readStr function?

How can I just output a string without getting the quotes thrown in as a free (and annoying ;) ) extra?

Lynx3d
04-02-2004, 06:53 PM
Well it clearly says:

len = LWLOAD_STR( ls, strbuf, maxn )
Read a string. Double quotes used to delimit the string in a text file are removed. Returns the length of the string.

If you have a problem with the fact that in the file strings are delimited with double quotes, write your own file handling.
Of course that'll be a problem with scene files, but that's just part of the rules for scene files as i understand it.