well, my friend, seems you've bought yourself an infinite loop...
if you use "while" your code will loop unyieldingly at that position - stopping orbiter from doing other things - things such as, well... altering your fuel level - which as you have set it, seems to be the only way out of your loop....
hence, an impossible situation - the infinite loop...
that function is already being called once every frame - remove the while block and you should see your light blink REALLY fast...
then consider the fact that it's blinking once per frame... that's about 60 times per second (provided you got enough computer to make that FPS)
either way - you should still think about slowing it down, so i suggest something like this:
Code:
static int blinkTimer = 0; // static means this number will be preserved between function calls (sets to zero only once)
blinkTimer += simdt; // add delta-time to your timer
if(FuelkMass<=35 && blinkTimer > 500) // 500 ms (blinks on and off every second)
{
RevertMasterAlarm(); // toggle your lamp
blinkTimer = 0; // reset timer
}
see if that helps :thumbup: