Frictional Games Forum (read-only)

Full Version: Fatal Error, Cannot Load World Map
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey Guys With my custom story whenever I got through a level door it brings up an error (the one in the title)
and then my game crashes. Don't Know what to do maybe my codes wrong.

Code:
////////////////////////////
// Run first time starting map
void OnEnter()
{
    SetEntityPlayerInteractCallback("ToTut2", "ChangeMap", false);
}

void ChangeMap(string &in asEntity)
{
    ChangeMap("Tut2.map", "PlayerStartArea_1", "", "");
}

And in my other maps HPS file

Code:
////////////////////////////
// Run first time starting map
void OnStart()
{
    SetEntityPlayerInteractCallback("ToTut1", "ChangeMap1", false);
}

void ChangeMap(string &in asEntity)
{
    ChangeMap1("Tutorial.map", "PlayerStartArea_2", "", "");
}

Thanks
-Grey Fox
I'm guessing you named the other map differently? (You also seem to have mixed up the function names.)
The Names are correct I know that.

What function names did I mess up?

-Grey Fox
(09-18-2011, 08:17 PM)GreyFox Wrote: [ -> ]What function names did I mess up?

In the "other map's" script, for the interact callback reference you have "ChangeMap1", but ChangeMap1 is inside another function (therefore cannot be accessed by the game, and if the game were to call it, it would generate an error).
Uhh So I switched

ChangeMap("Tutorial.map", "PlayerStartArea_2", "", "");

and

void ChangeMap1(string &in asEntity)

is that what you ment? Becuase I'm still getting an error. How do you do Level doors?

-Grey Fox
(09-18-2011, 08:36 PM)GreyFox Wrote: [ -> ]Uhh So I switched

ChangeMap("Tutorial.map", "PlayerStartArea_2", "", "");

and

void ChangeMap1(string &in asEntity)

is that what you ment? Becuase I'm still getting an error.

Code:
////////////////////////////
// Run first time starting map
void OnStart()
{
    SetEntityPlayerInteractCallback("ToTut1", "ChangeMap1", false);
}

void ChangeMap(string &in asEntity)
{
    ChangeMap1("Tutorial.map", "PlayerStartArea_2", "", "");
}

In SetEntityPlayerInteractCallback() you chose "ChangeMap1" for the callback. However, the ChangeMap1 function is located in your overloaded ChangeMap function. The game, therefore, will not be able to call the ChangeMap1 function because it hasn't be defined. However, this logical error won't (shouldn't) crash the game.

(09-18-2011, 08:36 PM)GreyFox Wrote: [ -> ]How do you do Level doors?

Level doors are as easy as placing them in your map, selecting it, and under the Entity tab (to the right) adjusting the properties. You don't need to use an interaction callback for the door to transfer the player to another map.
Oh really? I don't have to do anything in the HPS file for Level doors? Goddamnit I've spent all day trying to figure it out too Lol

Thank you I fixed it and it's now working.