Frictional Games Forum (read-only)

Full Version: Script Error! Help!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi can someone help me? I am scripting a custom mod for amnesia and i keep getting thease error messeges..
HELP!



void OnStart()
{
SetEntityPlayerInteractCallback("key_study_1", "Activate_monster", "True");
}

void OnEnter()
{

}
void Activate_monster(string &in Entity)
{

SetEntityActive("servant_grunt_1", "True");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "idle");

}


It says: No Matching signatures :/
Booleans (true and false) are not strings. A string is anything within quotation marks. Remove the capitalization and the quotation marks from the booleans.
(12-02-2011, 12:25 AM)Torelli Wrote: [ -> ]Hi can someone help me? I am scripting a custom mod for amnesia and i keep getting thease error messeges..
HELP!



void OnStart()
{
SetEntityPlayerInteractCallback("key_study_1", "Activate_monster", "True");
}

void OnEnter()
{

}
void Activate_monster(string &in Entity)
{

SetEntityActive("servant_grunt_1", "True");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "idle");

}


It says: No Matching signatures :/
Try taking the _ out of the Activate_monster. Do this for every time it says that is listed.


THANKS ALOT! it's working now! i have watched the "From noob to pro" tutorials and it is awsome! ThanksSmile
Btw i have one more question!

How do i play a sound after i have closed a note ?

there is no function to Stop playing music when you close the note well... i dont know.
but you can add a Timer To stop the music
you know like this

PHP Code:
void PickingUpNote(string &in asItemstring &in asEntity)
{
PlayMusic("PutYourSongHere "false5.0f0.0f0false);
AddTimer("StopMusic"5.00f,<-- When you Want to stop the music"StopMusic");
}

void StopMusic(string &in asTimer)
{
StopMusic(0.00);