Frictional Games Forum (read-only)

Full Version: Please help-SOLVED
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi i recently started using level editor evrything was fine until ir eceived this error
FATAL ERROR:Could not load Script file
custom_storie/test/custom_stories/test/maps/01_test.hps
main (3,5) ERR No matching signatures to
AddUseItemCallback(string@&, string@&, string@&, const bool)
Here my script Ill really appreciate any help
void OnStart()
{
AddUseItemCallback("","key_study_1", "level_hub_1" "FUNCTION",true);
}

void OnEnter()
{

}

void OnLeave()
{

}

void FUNCTION(string &in item,string &in door)
{
SetLevelDoorLocked("level_hub_1",false);
PlayGuiSound("unlock_door.snt",100);
RemoveItem("key_study_1");
}
AddUseIteamCallback
---
You should make it AddUseItemCallback.

You have Iteam Wink
Good luck!

EDIT:
PlayGuiSound("unlock_door.snt",100);
TIP: The 100 is 100 x the Original sound volume.. x100 is a bit too loud i suppose Wink
The PlayGuiSound is only for .ogg files!
Make it :
PHP Code:
PlayGuiSound("unlock_door.ogg",1); Or these often work as well :
PlayGuiSound("unlock_door",1); Try it yourself
OR
PHP Code:
PlaySoundAtEntity("","unlock_door.snt""WHERE TO PLAY YOUR SOUND AT"0false); 
AddUseIteamCallback

^ Typo.

Edit: Welp, I guess I took too long to have this tab open to not realize I was slowly ninja'd. Now that I'm here though, I guess I could point out what DnALANGE did about the volume, but 100 will not actually make it loud. The only valid values are from 0.0f to 1.0f. It's a float variable used as a percentage.
lol now i saw the grammar mistake :/
the problem is no matter what i do i get the same error Sad
Please try to post in the support section next time. Thanks.
same error?...
Are you sure?
Send the error over please.
---
ABout the 100, it should ONLY make sense in PlaySoundAtEntity! there 2 is times 2 the Original sound volume. Sorry Wink
(06-05-2015, 06:07 PM)DnALANGE Wrote: [ -> ]same error?...
Are you sure?
Send the error over please.
---
ABout the 100, it should ONLY make sense in PlaySoundAtEntity! there 2 is times 2 the Original sound volume. Sorry Wink

FATAL ERROR could not load script file
main(3,5) ERR No matching signatures to AddUseItemCallBack(string@&, string@&, string@&, const bool)
Here i have no idea what does it mean Huh

(06-05-2015, 06:07 PM)Traggey Wrote: [ -> ]Please try to post in the support section next time. Thanks.

Sorry its my first time on this site
void FUNCTION(string &in item,string &in door)
{
SetLevelDoorLocked("level_hub_1",false);
PlayGuiSound("unlock_door.snt",100);
RemoveItem("key_study_1");
}
---
Try this :
void FUNCTION(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("level_hub_1",false);
PlayGuiSound("unlock_door.snt",100);
RemoveItem("key_study_1");
}
(06-05-2015, 06:44 PM)DnALANGE Wrote: [ -> ]void FUNCTION(string &in item,string &in door)
{
SetLevelDoorLocked("level_hub_1",false);
PlayGuiSound("unlock_door.snt",100);
RemoveItem("key_study_1");
}
---
Try this :
void FUNCTION(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("level_hub_1",false);
PlayGuiSound("unlock_door.snt",100);
RemoveItem("key_study_1");
}

i dont know if im doing something wront but its the same error over and over again
here my files
void OnStart()
{
AddUseItemCallback("","key_study_1", "level_hub_1" "FUNCTION",true);
}

void OnEnter()
{

}

void OnLeave()
{

}

void FUNCTION(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("level_hub_1",false);
PlayGuiSound("unlock_door.snt",100);
RemoveItem("key_study_1");
}
at the editor i checked and everything seems okay im really glad you are trying to help me Smile
AddUseItemCallback("","key_study_1", "level_hub_1" "FUNCTION",true);
---
You missing a Comma.
Try this line and replace it with yours.:
AddUseItemCallback("","key_study_1", "level_hub_1", "FUNCTION",true);
Pages: 1 2