Hi there, sorry if this is a simple issue, but i'm going over the scripting tutorial, and I can't see why this script shouldn't work- I'm trying my first scripting using variables, and like in the tutorial I wanted the character to respond slightly differently the second time they interact with the object. The error that it tells me is that it is expecting a "{" at line 8 (function hMousehole_Interact()), but I did not think I needed one there. I tried just giving it a set of brakets, but then it tells me that it does not expect the next "if" to be there. The script is below. Any help would be appreciated. Thanks, M.
// room script file
int Mousecounter = 0;
function hMousehole_Look()
{
Display("It's where our house mouse, Bitey lives.");
}
function hMousehole_Interact()
if (Mousecounter == 0)
{
Display("Let's see if Bitey wants to join us for an adventure!");
Display("Ow! No. Bitey does not want to join us at this time.");
}
if (Mousecounter == 1)
{
Display("I think I have put my hand in there enough for one day.");
}
if (Mousecounter < 1)
{
Mousecounter += 1;
}
// room script file
int Mousecounter = 0;
function hMousehole_Look()
{
Display("It's where our house mouse, Bitey lives.");
}
function hMousehole_Interact()
if (Mousecounter == 0)
{
Display("Let's see if Bitey wants to join us for an adventure!");
Display("Ow! No. Bitey does not want to join us at this time.");
}
if (Mousecounter == 1)
{
Display("I think I have put my hand in there enough for one day.");
}
if (Mousecounter < 1)
{
Mousecounter += 1;
}