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
|