Nimono
02-18-2007, 12:52 PM
Sigh.... First off, someone PLEASE tell me the rules on double-posting here. -_-
My new problem is this one little error message:
"Cannot cast from Bool to Float!"
It comes up whenever I try to compile this 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[16] == 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[47] == 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[46] == true)
{
ffc FFCLocation = Screen->LoadFFC(32);
FFCLocation = (FFCLocation->X) + (FFCLocation->Y);
if (Screen->ComboD [FFCLocation] == DrmntTmeHle)
{
Screen->ComboD [FFCLocation] = OpnTmeHle;
}
}
}
}
Every time it reaches one of the checks for if Link has an item or not... It gives me that error. I HAVE to find out how to check if Link has a certain item or not, or this script won't exactly work right.... I know I could make it work without the item checks, but...
My new problem is this one little error message:
"Cannot cast from Bool to Float!"
It comes up whenever I try to compile this 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[16] == 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[47] == 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[46] == true)
{
ffc FFCLocation = Screen->LoadFFC(32);
FFCLocation = (FFCLocation->X) + (FFCLocation->Y);
if (Screen->ComboD [FFCLocation] == DrmntTmeHle)
{
Screen->ComboD [FFCLocation] = OpnTmeHle;
}
}
}
}
Every time it reaches one of the checks for if Link has an item or not... It gives me that error. I HAVE to find out how to check if Link has a certain item or not, or this script won't exactly work right.... I know I could make it work without the item checks, but...