Well, I was happily scripting away when this little wonder came up, I just can't work out what I've done wrong, this is where the problem is apparently:
-script beings-
function hotspot4_a() {
// script for hotspot4: Interact hotspot
if (GetGlobalInt(2)==0)
SetGlobalInt (2, 1);
DisplaySpeech (PZY , "what the hell is this and what is it doing in the sofa?");
AddInventory (4);
else
DisplaySpeech (PZY , "what are the odd's of finding TWO giant mushrooms in the sofa?");
}
-script ends-
don't ask me what's up with the giant mushroom, it makes sence in the game.
I realise it's probably something really painfully obvious, so thanks for your help.
if (GetGlobalInt(2)==0)
{
SetGlobalInt (2, 1);
DisplaySpeech (PZY , "what the hell is this and what is it doing in the sofa?");
AddInventory (4);
}
else
{
DisplaySpeech (PZY , "what are the odd's of finding TWO giant mushrooms in the sofa?");
}
If you are doing more than one line of code you need to define the code blocks with the braces { and }
I added the second set just because you ended the code with a brace but doing
else DisplaySpeech (PZY , "what are the odd's of finding TWO giant mushrooms in the sofa?");
would also be acceptable.
oh fantastic, thanks for the help.
Actually, the last brace belongs to the function, so make sure there are two braces at the end. Just pointing out. :)