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
Scripting error help
DashFire61 Offline
Junior Member

Posts: 1
Threads: 2
Joined: Sep 2012
Reputation: 0
#1
Scripting error help

////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "templekey", "startdoor_nextmap", "UsedKeyOnDoor", true);
}


Void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("startdoor_nextmap", false, true);
PlaySoundAtEntity("", "unlock_door", "startdoor_nextmap", 0, false);
RemoveItem("templekey");
}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}



The error: FATAL ERROR: Could not load script file 'custom_stories/MLP/maps/start.hps
main(9,1): ERR :'Void is not a data type
main(9,1): ERR :'Void is not a data type
main(10,1): ERR : Not all paths return a value
09-27-2012, 05:51 AM
Find
Mine Turtle Offline
Senior Member

Posts: 647
Threads: 32
Joined: Mar 2011
Reputation: 29
#2
RE: Scripting error help

your second void function has a capital V. change it to lowercase

[Image: 201107142327000.gif]
09-27-2012, 07:48 AM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#3
RE: Scripting error help

I think it's this way:

////////////////////////////

// Run first time starting map

void OnStart()

{

AddUseItemCallback("", "templekey", "startdoor_nextmap", "UsedKeyOnDoor", true);

}





void UsedKeyOnDoor(string &in asItem, string &in asEntity)

{

SetSwingDoorLocked("startdoor_nextmap", false, true);

PlaySoundAtEntity("", "unlock_door.snt", "startdoor_nextmap", 0, false);

RemoveItem("templekey");

}



////////////////////////////

// Run when entering map

void OnEnter()

{



}



////////////////////////////

// Run when leaving map

void OnLeave()

{



}







The error: FATAL ERROR: Could not load script file 'custom_stories/MLP/maps/start.hps

main(9,1): ERR :'Void is not a data type

main(9,1): ERR :'Void is not a data type

main(10,1): ERR : Not all paths return a value

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
09-27-2012, 11:41 AM
Find




Users browsing this thread: 2 Guest(s)