[solved room_AfterFadein error]

Started by BockerAlex, Thu 12/06/2008 01:20:54

Previous topic - Next topic

BockerAlex

I recently got an error trying to run a game that I am making (to see if I had managed to fix a previous problem).

Upon pressing run, the window popped up, and after a few seconds of still a black screen, this error popped up:



An internal error has occured. Please note down the following
information.
If the problem persists, contact Chris Jones.
(ACI version 3.01.1018)

Error: prepare_script: error -18 (no such function in script) trying to run
'room_AfterFadeIn' (Room 1)


I had just been trying to fix the game so that when you looked at something, a box popped up giving you a discription of it (with the function_nameofobject()
{
Display("Text.");
}

) etc, and didn't mess around with anything else.

Khris

Looks like you didn't fix but rather screw up the game.

Could you post the complete room script of room 1?

BockerAlex

Sure.

Here:

// room script file

function hSand_Look()
{
  Display("Yellow sand. Nice and warm from the sun.");
}

function hSand_PickUp()
{
  Display("-The sand slips through your fingers.-");
  }

function hSand_Talk()
{
Display("I don't think sand can talk...");
}

function hSand_UseInv()
{
Display("Nope that doesn't work");
}

function hWetsand_Look()
{
Display("Wet sand. Every child knows this is the best sand to build sandcastles with.");
}

function hWetsand_PickUp()
{
Display("-The wet sand clumps together in your hand, which you then put back down-");
}

function hWetsand_Talk()
{
Display("Nope, the wet sand isn't talking back.");
}

function hWetsand_UseInv()
{
Display("Nope that doesn't work");
}

function hSea_Look()
{
Display ("The sea, it's blue, it's big, big and blue is the sea.");
}

function hSea_PickUp()
{
Display("The water slips through your fingers, making them wet.");
}

function hSea_WalkOn()
{
Display("No! My feet will get wet!");
}

function hSea_Talk()
{
Display("As fun as it is, I'm not talking to the sea.");
}

function hSea_UseInv()
{
Display("I'm not throwing anything into the sea.");
}

function hRocks_Look()
{
Display("Rocks, they're still rocks, dull grey rocks.");
}

function hRocks_PickUp()
{
Display("-One of the rocks was picked up making a dull thud when it was dropped back into place-");
}

function hRocks_WalkOn()
{

}

function hRocks_UseInv()
{
Display("I don't think I can create a spark from that");
}

function Dangersign_Interact()
{
Display("The sign is initially too large to carry - the bars are bent and twisted off leaving your hands red and sore");
}

function Dangersign_Look()
{
  Display("A yellow sign upon closer inspection there are bars twisted and bent on it obviously broken off from something.");
}


SSH

The clue is in the "no such function in script" words in the error message. You have an interaction set up for the after fadein event in the room's interactions, but no such function in the script. Either reinstate the function in the script, or remove the interaction.
12

BockerAlex

Alright.
What code is used to reinstate it? I haven't had it that long. ^^;

Lt. Smash

I also had this problem. You just have to go to the rooms event list and delete the room_AfterFadeIn from the "enter room after fade-in"-event.
Or you make a new function in the room script:

Code: ags

function room_AfterFadeIn()
{
}

SMF spam blocked by CleanTalk