Frictional Games Forum (read-only)

Full Version: Lines Error in .hps
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When i've add line AddUseItemCallback("","key1","door1","Door,true); in the test i see the error: Unexpected end of file. What's wrong with that line? .hps file:
void OnStart()
{
AddEntityCollideCallback("Player", "antonydead", "Message1", true, 1);
AddEntityCollideCallback("Player", "rozdzial1", "Message2", true, 1);
AddEntityCollideCallback("Player", "trup1", "Message3", true, 1);
AddUseItemCallback("","key1","door1","Door,true);
}

void Message1(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "AntonyDead", 10);
}

void Message2(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "Rozdzial1", 10);
}

void Message3(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "Trup1", 10);
}

void Door(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door1",false,true);
PlaySoundAtEntity("","unlock_door","door1",0,false);
RemoveItem("key1");
}

What i've must done?
AddUseItemCallback("","key1","door1","Door,true);

You have THIS : "Door
Add the " - Door like this "Door"
So Add the " And it should work fine.
You just missed 1 bracket Wink
Here i'll make it for you.

PHP Code:
AddUseItemCallback("","key1","door1","Door",true); 
---
Extra Information;
Please do NOT make severals threads for 1 question please.
Just RE-ASK the same question in the same Threadh, or we will have a whole page for 1 question Wink
Thank you.
(01-02-2015, 03:09 PM)DnALANGE Wrote: [ -> ]AddUseItemCallback("","key1","door1","Door,true);

You have THIS : "Door
Add the " - Door like this "Door"
So Add the " And it should work fine.
You just missed 1 bracket Wink
Here i'll make it for you.

PHP Code:
AddUseItemCallback("","key1","door1","Door",true); 
---
Extra Information;
Please do NOT make severals threads for 1 question please.
Just RE-ASK the same question in the same Threadh, or we will have a whole page for 1 question Wink
Thank you.

Thanks. It's working
Your welcome.
You can IF a question is solved add this in your threadname;
SOLVED.
Like;
[SCRIPT] Lines Error in .hps (Solved)