Talk:PrintToConsole

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

CtD hazard[edit source]

Argh! - I just spent an hour debugging a section of code, taking it apart, putting it back together, it made no sense whatsoever.

Eventually I discovered a single PrintToConsole line I was using for debugging where I had put two variables inside it, but only registered one of them. ie PrintToConsole "Blah %.0f, blah %.0f", sBlah

That can cause a crash it seems... think someone should note that... god what a headache >.< --Ryuujin 20:16, 24 August 2008 (EDT)

Yes, that one is a pain if you aren't careful with the variables. I've already ran into it and reported it to the OBSE guys and it will be fixed in v0016.
--quetzilla 00:04, 25 August 2008 (EDT)

Arrays ?[edit source]

No mention is made in the article of arrays. Things like printc "name : %z" Quest.name[str] (name is a stringMap) do not work, not even things like printc "hour : %.2f" hour[0] (hour being an array of floats). Any workarounds (except defining a new var) ? UDUN 10:24, 10 June 2010 (EDT)

You may use Print "name : " + Quest.name[str] and Print "hour : " + ToString hour[0], but ToString does not have the number formatting capabilities that PrintC has. QQuix 07:23, 12 June 2010 (EDT)
Use sv_Construct to format numbers.
shadeMe TALK 11:18, 14 June 2010 (EDT)
Thanks indeed to both of you :) UDUN 20:35, 28 June 2010 (EDT)