Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Lines Error in .hps
MaksoPL Offline
Member

Posts: 51
Threads: 26
Joined: Mar 2014
Reputation: 0
#1
Lines Error in .hps

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?
01-02-2015, 02:56 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#2
RE: Lines Error in .hps

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: (Select All)
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.
(This post was last modified: 01-02-2015, 03:14 PM by DnALANGE.)
01-02-2015, 03:09 PM
Find
MaksoPL Offline
Member

Posts: 51
Threads: 26
Joined: Mar 2014
Reputation: 0
#3
RE: Lines Error in .hps

(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: (Select All)
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
01-02-2015, 03:51 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#4
RE: Lines Error in .hps

Your welcome.
You can IF a question is solved add this in your threadname;
SOLVED.
Like;
[SCRIPT] Lines Error in .hps (Solved)
01-02-2015, 03:59 PM
Find




Users browsing this thread: 1 Guest(s)