Code:
include <options.txt>;
bmap des_1 = <des_1.bmp>;
var schalter1_vis_des1 = 1;
panel design1
{
bmap = des_1;
flags = transparent,visible;
}
function whiler1()
{
if(schalter1_vis_des1 == 1)
{
design1.alpha = 100;
}
else
{
design1.alpha = 0;
}
}
function main()
{
design1.alpha = 100;
while(1)
{
whiler1();
wait(1);
}
}
function aa()
{
schalter1_vis_des1 = 0;
}
on_anykey = aa();
Durch diesen Script soll ein Panel erscheinen und beim Druck irgendeinen Knopfes unsichtbar werden. Allerdings tut sich nichts. Ich habe den Verdacht, dass "function whiler1()" nicht wiederholt wird, trotz while.
Was ist an dem Script fehlerhaft?
options.txt beinhaltet nur: var video_mode = 7;
This script must do a panel visible and if I press anykey than the panel must be invisible. But not happens if I press anykey. I think, function whiler1() wasn't while, but it should while.
Where is the error?
options.txt includes only: var video_mode = 7;