There appears to be a bug with a series of If statements when compiled in the recent builds.
This quest was made in build 1074, with the scripts compiled in the same build.
http://www.mediafire.com/file/ndjakj3hhwz/BugTestA.qst
The scripts are all of the following:
//Test Script for bug testing, by HeroOfFireimport "std.zh"
//JumpLink FFC Script
ffc script JumpLink {
void run() {
while (true)
{
if (Link->Z == 0 && Link->InputL)
{
Link->Jump = 3;
Game->PlaySound(SFX_JUMP);
}
else if (Link->Z > 0 && Link->Jump > 3)
{
Link->Jump = 3;
}
Waitframe();
}
}
}
//GiveRupee FFC Script
ffc script GiveRupee {
void run(int amount) {
while (true)
{
if (Abs(Link->X - this->X) < 4 && Abs(Link->Y - this->Y) < 4)
{
Game->Counter[1] = Game->Counter[1] + amount;
if (Game->Counter[1] > Game->MCounter[1])
{
Game->Counter[1] = Game->MCounter[1];
}
}
Waitframe();
}
}
}
//GiveItem FFC Script
ffc script GiveItem {
void run(int itemNum) {
while (true)
{
if (Abs(Link->X - this->X) < 4 && Abs(Link->Y - this->Y) < 4 && Link->Item[itemNum] == false)
{
Link->Item[itemNum] = true;
}
Waitframe();
}
}
}
The JumpLink script is the one designed to reproduce the bug, which is why the unusual else if statement exists.
The demonstration is one screen above the start. Hold 'L' to jump. When functioning correctly, Link only jumps when touching the ground. Obviously, the else if statement never is true, and the first if statement only is true when Link is on the ground.
If played in 1074 or in the recent builds without recompiling, the script works fine.
If the script is recompiled in the newer builds (so far tested in both build 1099 and build 1108), a strange bug occurs. While holding 'L', Link continues to rise, because the first if statement is being constantly run, even though it shouldn't always be true.
Removing the "else" and leaving two seperate if statments still produces the bug. Removing the entire second if statement prevents the bug from happening.