In 219-windows, bools will not work with == (equals) in ZScript. If you try to compile a script that has something like "if(foo == true)", you'll always get a "Cannot cast from bool to float" error. This shouldn't happen. An example script that gives this error? Try out my newest item script:
// Harp of Ages: Yes, it's true! If you have certain items, this Harp will do different things!
// Changable Variables:
// ID1- ID of the item you wish to be the Tune of Echoes, the first Harp tune. Use std.zh for the IDs.
// ID2- ID of the item you wish to be the Tune of Currents, the second Harp tune. See above.
// ID3- ID of the item you wish to be the Tune of Ages, the final Harp tune. Also see the first.
// DrmntTmeHle- Combo used by the Dormant/Sleeping Time Hole (Before using Tune of Echoes).
// OpnTmeHle- Combo used by the Open/Awakened Time Hole (After using Tune of Echoes).
// Note: Due to limitations... IF YOU AWAKEN A TIME PORTAL, USE IT. If you leave the screen after awakening one and come back, if you use the Tune
// of Echoes again, you MUST leave the screen, come back, and do it AGAIN! Otherwise, you'll go to the wrong place... >_<import "std.zh"
item script HarpofAges
{
int CurMap = 0;
int CurDMap = 0;
int CurScrn = 0;
int LastMap = 0;
int LastDMap = 0;
int LastScrn = 0;
int WrpMap = 0;
int WrpDMap = 0;
int WrpScrn = 0;
int WrpMap2 = 0;
int WrpDMap2 = 0;
int WrpScrn2 = 0;
int ID1 = 46;
int ID2 = 47;
int ID3 = 0;
int DrmntTmeHle = 0;
int OpnTmeHle = 0;
int Time = 1;
int TimeCheck1 = 1;
int TimeCheck2 = 0;
int FFCLocation = 0;
void run()
{
CurMap = Game->GetCurMap();
CurDMap = Game->GetCurDMap();
CurScrn = Game->GetCurScreen();
WrpMap = CurMap + 1;
WrpDMap = CurDMap + 1;
WrpScrn = CurScrn;
WrpMap2 = CurMap - 1;
WrpDMap2 = CurDMap - 1;
WrpScrn2 = CurScrn;
if (Link->Item[ID3] == true)
{
if (CurMap == 2 || CurMap == 4 || CurMap == 6 || CurMap == 8 || CurMap == 10)
{
Time = 0;
Link->PitWarp(WrpDMap2, WrpScrn2);
Quit();
}
else if (CurMap == 1 || CurMap == 3 || CurMap == 5 || CurMap == 7 || CurMap == 9)
{
Time = 1;
Link->PitWarp(WrpDMap, WrpScrn);
Quit();
}
}
else if (Link->Item[ID2] == true)
{
if (CurMap == 2 || CurMap == 4 || CurMap == 6 || CurMap == 8 || CurMap == 10)
{
Time = 0;
Link->PitWarp(WrpDMap2, WrpScrn2);
Quit();
}
else if (CurMap == 1 || CurMap == 3 || CurMap == 5 || CurMap == 7 || CurMap == 9)
{
Time = 1;
}
}
else if (Link->Item[ID1] == true)
{
ffc FFCLocation = Screen->LoadFFC(32);
FFCLocation = (FFCLocation->X) + (FFCLocation->Y);
if (Screen->ComboD [FFCLocation] == DrmntTmeHle)
{
Screen->ComboD [FFCLocation] = OpnTmeHle;
}
}
}
}
Yes, it's the Harp of Ages. Bear with me here. Try compiling that in 16c or the latest alpha, and it'll tell you it can't cast from bool to float. That makes it hard for me to check for a certain item before you could use it...