Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fatal Error, Cannot Load World Map
GreyFox Offline
Member

Posts: 162
Threads: 23
Joined: Jul 2011
Reputation: 2
#1
Fatal Error, Cannot Load World Map

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.

////////////////////////////
// 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

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

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

Thanks
-Grey Fox

Current Project
Forgotten
09-18-2011, 06:13 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Fatal Error, Cannot Load World Map

I'm guessing you named the other map differently? (You also seem to have mixed up the function names.)

Tutorials: From Noob to Pro
(This post was last modified: 09-18-2011, 08:11 PM by Your Computer.)
09-18-2011, 08:07 PM
Website Find
GreyFox Offline
Member

Posts: 162
Threads: 23
Joined: Jul 2011
Reputation: 2
#3
RE: Fatal Error, Cannot Load World Map

The Names are correct I know that.

What function names did I mess up?

-Grey Fox

Current Project
Forgotten
09-18-2011, 08:17 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: Fatal Error, Cannot Load World Map

(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).

Tutorials: From Noob to Pro
09-18-2011, 08:22 PM
Website Find
GreyFox Offline
Member

Posts: 162
Threads: 23
Joined: Jul 2011
Reputation: 2
#5
RE: Fatal Error, Cannot Load World Map

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

Current Project
Forgotten
09-18-2011, 08:36 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#6
RE: Fatal Error, Cannot Load World Map

(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.

////////////////////////////
// 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.

Tutorials: From Noob to Pro
09-18-2011, 08:52 PM
Website Find
GreyFox Offline
Member

Posts: 162
Threads: 23
Joined: Jul 2011
Reputation: 2
#7
RE: Fatal Error, Cannot Load World 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.

Current Project
Forgotten
(This post was last modified: 09-18-2011, 09:15 PM by GreyFox.)
09-18-2011, 09:06 PM
Find




Users browsing this thread: 1 Guest(s)