Item text is running away!
Displaying 1-4 of 4 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Frumple

Okay, the other problem is fixed, but now I have no idea how to fix. The following code when run, creates a box and is supposed to insert itemtext into the box. However, right when this is loaded, the itemtext "runs away" downward and disappears.

It probably has something to do with the for and while loops. Is there another way to reorganize the loops so the text stays put?

// Other code above
Unpress(1);
while(!b1)
{
Clrscr();
Box(0,0,319,175,150,1);
for(i = 0; i 0)
{
// Switch to next column at 15
if(ywrite = 15 && xwrite = 0)
{ ywrite = 0; xwrite = 1; }

// Write something
GotoXY(25+(160*xwrite),5+(15*ywrite));
PrintString(commtext, itemname[i]);

// Move the GotoXY down to next line
ywrite++;
// Count items
item[i]--;
// Increase shadow # of items
restoreitem++;
}
item[i] = restoreitem;
}
// Code below controls pointer

Frumple




I really should stop playing online multiplayer browser games, but I'm addicted. ^_^ But I've been working on my own little RPG on and off for the last TWO years! Now, I hope, I can finally get it DONE!...(or just release a small version :P)

Posted on 2000-11-11 21:56:51

TheGerf

for(i = 0; i 0)
That is the funkiest FOR loop I've ever seen. Not being an expert programmer I might be wrong, but that looks just wrong. It doesn't say when to end the loop, or how to increment the variable.





TheGerf, not just any gerf.

Posted on 2000-11-12 00:34:07

Frumple

stupid html screwed up the for loop. It really is supposed to look like this:

for(i = 0; i "less than sign" 50; i++)



I really should stop playing online multiplayer browser games, but I'm addicted. ^_^ But I've been working on my own little RPG on and off for the last TWO years! Now, I hope, I can finally get it DONE!...(or just release a small version :P)

Posted on 2000-11-12 17:34:28

Ear

You should use &lt; for < and &gt; for >. If this didn't appear, v-rpg's message board doesn't like me. :(



- Ear

Posted on 2000-11-13 16:31:52


Displaying 1-4 of 4 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.