vabalas
Junior Member
Posts: 4
Threads: 2
Joined: Jan 2013
Reputation:
0
|
ERR: Expected data type
Every time I try to open my custom map, it says ...main (20,15) : ERR : Expected data type. I tried to solve it myself, but couldn't.
here's the script:
// This runs when the map first starts
void OnStart()
{
AddEntityCollideCallback("Player", "end", "ending", true, 1);
GiveItemFromFile("lantern_" + I, "lantern");
}
//===========================================
// This runs when the player enters the map
void OnEnter()
{
}
//===========================================
// This runs when the player leaves the map
void OnLeave()
{
}
void ending("Player", "end", 1)
{
StartCredits("themonsterswithin.ogg", false, "Ending", "MainCredits", 0);
FadeOut(float 1);
}
Any help?
|
|
01-19-2013, 07:15 PM |
|
The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
|
RE: ERR: Expected data type
(01-19-2013, 07:15 PM)vabalas Wrote: Every time I try to open my custom map, it says ...main (20,15) : ERR : Expected data type. I tried to solve it myself, but couldn't.
here's the script:
// This runs when the map first starts
void OnStart()
{
AddEntityCollideCallback("Player", "end", "ending", true, 1);
GiveItemFromFile("lantern_" + I, "lantern");
}
//===========================================
// This runs when the player enters the map
void OnEnter()
{
}
//===========================================
// This runs when the player leaves the map
void OnLeave()
{
}
void ending("Player", "end", 1)
{
StartCredits("themonsterswithin.ogg", false, "Ending", "MainCredits", 0);
FadeOut(float 1);
}
Any help?
Heh, well. You have some things wrong. Let me fix 'em!
Good code:
// This runs when the map first starts
void OnStart()
{
AddEntityCollideCallback("Player", "end", "ending", true, 1);
GiveItemFromFile("lantern", "lantern.ent");
}
//===========================================
// This runs when the player enters the map
void OnEnter()
{
}
//===========================================
// This runs when the player leaves the map
void OnLeave()
{
}
void ending(string &in asParent, string &in asChild, int alState)
{
StartCredits("themonsterswithin.ogg", false, "Ending", "MainCredits", 0);
FadeOut(1);
}
THE OTHERWORLD (WIP)
Aculy iz dolan.
(This post was last modified: 01-19-2013, 07:37 PM by The chaser.)
|
|
01-19-2013, 07:36 PM |
|
vabalas
Junior Member
Posts: 4
Threads: 2
Joined: Jan 2013
Reputation:
0
|
RE: ERR: Expected data type
Thanks a lot!
|
|
01-20-2013, 10:25 AM |
|
|