Mailing List
Home
Forum Home
Mac Game - Mac game development
Rivers of MUD - a Diku and Merc based multiuser dungeon
SMAUG
Subjects
Getting UDP through NAT/firewalls/whatever for a game
Getting UDP through NAT/firewalls/whatever for a game
QuickTime errors
Python script as stand alone MUD server
Subject: Various sound problems
Fragment Shaders & GL TEXTURE RECTANGLE EXT
Subject: Timers and global variables
Re: Language and platform for Text MUD server
Apparent acquisition of Yantis (mysupersales) by IDE
HID keyboard
Getting UDP through NAT/firewalls/whatever for a game
Microsoft Sparkle
Subject: Director MX
Congratulations Horizons
Yet more problems fullscreen mode
Apple Dev Kitchen Them 's tasty vittles, Maw!
NSOpenGLContext, Pbuffers, and drawables
More DCR "theft " naughtiness
dynamic sprite creation and imaging lingo
Re: Find stuff in Flash array?
Effects of skill imbalances?
QuickTime errors
Rom 2 4/Quickmud Enhancement/Bug fix
Subject: Working with XML files/CFURL
smooth scrolling/subpixel tweening
RE: (Ron help me?) Flash text
Subject: Flash Racing
Subject: MudDev FAQ 2
Browser based games
Installing GLUT
Special character in Flash XML
 
Subject: Need a bit of help

Subject: Need a bit of help

2005-09-05       - By Brian Sands

 Back
Reply:     1     2     3  

<p>Hello people,</p><p>Having a problem with formatting output in a
certain piece of code.? Since I am using a for statement I can't figure
out how to put 2 things on a line instead of breaking the line after only
one.</p><p>Here is my code:</p><p>?? for( iWear = 0; iWear &lt; MAX_WEAR;
iWear++ )<br />??? {<br />????? count = 0;<br />????? if( iWear &lt; (
MAX_WEAR - 3 ) )<br />????? {<br />??????????????? send_to_char(
&quot;&amp;B* &quot;, ch);<br />??????????????? sprintf( buf,
&quot;%s&quot;, where_name[iWear] );<br />??????????????? pager_printf(
ch, &quot;&amp;G[&amp;c%-8s&amp;G] &quot;, buf );<br />????? }<br />?????
if( ( obj2 = get_eq_char( victim, iWear ) ) == NULL &amp;&amp; iWear &lt;
( MAX_WEAR - 3 ) )<br />??????? {<br />???????? sprintf( buf,
&quot;Nothing&quot;);<br />???????? pager_printf( ch,
&quot;&amp;r[&amp;c%-28s&amp;r]&quot;, buf );<br />??????? }<br />?????
for( obj = victim-&gt;first_carrying; obj; obj = obj-&gt;next_content )<br
/>????? {<br />???????? if( obj-&gt;wear_loc == iWear )<br />???????? {<br
/>??????????? count++;<br />??????????? if( count &gt; 1 )<br
/>??????????? {<br />??????????? sprintf( buf, &quot;%s&quot;,
format_obj_to_char( obj, ch, TRUE) );<br />??????????? pager_printf( ch,
&quot;&amp;r[&amp;c%-28s&amp;r]&quot;, buf );<br />??????????? }?? <br
/>??????????? else<br />??????????? {<br />??????????? sprintf( buf,
&quot;%s&quot;, format_obj_to_char( obj, ch, TRUE) );<br />???????????
pager_printf( ch, &quot;&amp;r[&amp;C%-28s&amp;r]&quot;, buf );?? <br
/>??????????? }<br />?????????? }<br />??? }<br />?? }</p><p>Here is the
output that it gives for that
section...</p><p>*?????????????????????????????????????????????????????????????
????????????????????
*<br />* [light?? ] [Nothing???????????????????? ]* [finger? ]
[Nothing???????????????????? ]* [finger? ] [<br
/>Nothing???????????????????? ]* [neck??? ] [Nothing????????????????????
]* [neck??? ] [Nothing?????? <br />????????????? ]* [body??? ] [a sub
issue vest??????????? ]* [head??? ] [a sub issue helmet????????? <br />]*
[legs??? ] [Nothing???????????????????? ]* [feet??? ] [a pair of sub issue
boots?? ]* [hands?? ] <br />[a pair of sub issue gloves? ]* [arms??? ]
[Nothing???????????????????? ]* [shield? ] [a sub issue s<br
/>hield????????? ]* [body??? ] [Nothing???????????????????? ]* [waist?? ]
[Nothing??????????????????? <br />?]* [wrist?? ]
[Nothing???????????????????? ]* [wrist?? ] [Nothing???????????????????? ]*
[wielded ]<br />?[a sub issue sword?????????? ]* [held??? ]
[Nothing???????????????????? ]* [offhand ] [Nothing???? <br
/>??????????????? ]* [ears??? ] [Nothing???????????????????? ]* [eyes??? ]
[Nothing?????????????????? <br />? ]* [wielded ]
[Nothing???????????????????? ]* [back??? ] [Nothing????????????????????
]</p><p>Notice nothing is formatted because I have taken out all line
breaks in my attempt to get it to look like
this...</p><p>*????????????????????????????????????????????????????????????????
?????????????????
<br />* [light?? ] [Nothing???????????????????? ] ?[finger? ]
[Nothing???????????????????? ]</p><p>* [finger? ]
[Nothing???????????????????? ] ?[neck??? ] [Nothing????????????????????
]</p><p>* [neck??? ] [Nothing???????????????????? ] ?[body??? ] [a sub
issue vest??????????? ]</p><p>* [head??? ] [a sub issue helmet????????? ]?
[legs??? ] [Nothing???????????????????? ]</p><p>* [feet??? ] [a pair of
sub issue boots?? ] [hands?? ] [a pair of sub issue gloves? ]</p><p>Notice
that there are 2 entries per line instead of just one, or breaking off at
the autowrap.</p><p>Please let me know if I can do anything to format for
this.</p><p>Sorry about the format of the email if it's bad, I'm writing
in a web-based email client.</p><p>-Brian</p>