Difference between revisions of "PrintToConsole"

Jump to navigation Jump to search
236 bytes removed ,  04:30, 27 January 2008
→‎Notes: Better Example
imported>Haama
(→‎Notes: Added v13 and v14 notes)
imported>Haama
(→‎Notes: Better Example)
Line 24: Line 24:
**Also, you can now use up to 20 variables.
**Also, you can now use up to 20 variables.
**Additional format specifiers used by the C function printf() may work as well. Due to the fact that integer script variables are stored as floats, using %0x to display hexadecimal notation may not display the expected output.
**Additional format specifiers used by the C function printf() may work as well. Due to the fact that integer script variables are stored as floats, using %0x to display hexadecimal notation may not display the expected output.
**Example (note that due to wiki limitations, the MessageboxEX line has been split into two):
**Example:
<pre>    ref refVar1
<pre>    ref refVar1
    ref refVar2
     short keyCode
     short keyCode
     short goldCost
     short goldCost
...
...
     set refVar1 to AdrianDecanusREF
     set refVar1 to AdrianDecanusREF
    set refVar2 to ShadySamREF
     set keyCode to GetControl 15 ; menu key, assuming 'Tab' (15)
     set keyCode to GetControl 15 ; menu key, assuming 'Tab' (15)
     set goldCost to 500
     set goldCost to 500


     MessageBoxEX "Press %k to summon a companion %rCost: %g gold|%n|%n|Cancel"
     PrintToC "Press %k to summon companion %n %rCost: %g gold" keyCode refVar1 goldCost</pre>
                keyCode goldCost refVar1 refVar2</pre>
prints out
prints out
<pre>    Press TAB to summon a companion
<pre>    Press TAB to summon companion Adrian Decanus
             Cost: 500 gold
             Cost: 500 gold</pre>
          [Adrian Decanus]
              [Shady Sam]
              [Cancel]</pre>


<!--[[Category: OBSE Functions]]
<!--[[Category: OBSE Functions]]
Anonymous user

Navigation menu