- int cycle; - Again, variables can't be declared in this location. Move it down inside the "void run()" function.
- const int ... - Constants must be defined globally, outside of any functions, in ZScript. So move all of the constant declarations to the top of the script to fix it.
- Game->Lkeys[i] = 0; - Capitalize the "k" in "Lkeys"
- bool[255] items; - Arrays are declared with the size located after name. So, you would use "bool items[255];" instead.
- void Run() - ZScript is case-sensitive, so don't forget to lowercase the "r" so it becomes "void run()"
CODE
//Reset Link's inventory
if(resetI == 1)
{
for(int i; i <255; i++)
{
if (items[i] == true)
{
}
else
{
Link->Item[i] = false;
}
}
}
if(resetI == 1)
{
for(int i; i <255; i++)
{
if (items[i] == true)
{
}
else
{
Link->Item[i] = false;
}
}
}
could be reduced to:
CODE
//Reset Link's inventory
if(resetI == 1)
{
for(int i; i <255; i++)
{
if (items[i] == false) Link->Item[i] = false;
}
}
Not really necessary, but gets rid of unnecessary code.
So, I still have not tested this, only fixed compile-time errors so far. I might have some time tomorrow to mess around with it, though I think Sat. after work will be the first chance I have to check for "algorithmic errors".
Edited by Elmensajero, 21 January 2009 - 11:44 PM.