AKSepter01
|
OK, Repost.
I have this idea to make a textbox where if the player is behind the textbox (which would be y=80 or less) than the textbox is displayed at the bottom of the screen, instead. I got it to work, except for the 'player' variable... If I am not mistaken, this should work right=
//dis be the textbox function. duh
int textboxim;
void TextBox(string line1, string line2, string line3, string line4)
{
textboxim = LoadImage("textbox.gif");//loads image
while (!b1)
{
if (entity.y[player]*less than*=80);
{
Render();
CopySprite(0,0,320,80,textboxim);
GotoXY(4,4); PrintString(0,line1);
GotoXY(4,23); PrintString(0,line2);
GotoXY(4,42); PrintString(0,line3);
GotoXY(4,61); PrintString(0,line4);
ShowPage();
UpdateControls();
free(textboxim);
}
else
{
Render();
CopySprite(0,160,320,80,textboxim);
GotoXY(4,164); PrintString(0,line1);
GotoXY(4,183); PrintString(0,line2);
GotoXY(4,202); PrintString(0,line3);
GotoXY(4,221); PrintString(0,line4);
ShowPage();
UpdateControls();
free(textboxim);
}
}
}
However, the scriptor complains about the 'player' variable, even though it SHOULD always equal the player's sprite/entity number. If anybody knows how to work around this, can they tell me?
Thanks!
Posted on 2001-01-28 19:44:01
|
el_desconocido
|
It may be the board playing tricks, or a typo, but I think the problem may be the extra ; after your if()
if (entity.y[player]*less than*=80); <-- that one.
Sometimes the compiler gets confused, and doesn't actually point you to the problem.
<ps> you can use < and > to have the board show < and > respectively.</ps>
-Pontifex
"How many rocks are there, in the whole world?"
Posted on 2001-01-28 20:05:02
|