Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved Weird error...
Author Message
Saren Offline
Member

Posts: 196
Joined: Jan 2012
Reputation: 1
Post: #1
Weird error...
Okay so I get this weird error when I tried to do a script but the weird thing is, it worked fine before.. now it says alooooot of weird stuff that makes no sense, here's my script
void OnStart()
{
AddUseItemCallback("", "Prisonkey", "prisondoor", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
AddUseItemCallback("", "stone_hammer_chipper", "cell_breakable_wall_1", "BreakWall", false);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("prisondoor", false, true);
PlaySoundAtEntity("", "unlock_door", "prisondoor", 0, false);
RemoveItem("Prisonkey");
}
//Prison brute
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute", true);
AddEnemyPatrolNode("servant_brute", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_13", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_14", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_15", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_16", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_17", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_18", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_19", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_20", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_21", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_22", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_23", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_24", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_25", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_26", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_27", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_28", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_29", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_30", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_31", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_32", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_33", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_34", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_35", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_36", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_37", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_38", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_39", 0, "");
AddEnemyPatrolNode("servant_brute", "PathNodeArea_40", 0, "");
}
void Despawnservant_brute(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("servant_brute", false);
}
//Cell wall
void BreakWall(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("cell_breakable_wall_1", false, true);
PlaySoundAtEntity("", "03_break_wall", "cell_breakable_wall_1", 0, false)
SetEntityActive("cell_breakable_wall_1", false);
SetEntityActive("cell_breakable_wall_broken_1", true);
}

void OnLeave()
{
}
Basically, it's those 2 lines the script dose'nt like for some reason...

(This post was last modified: 03-26-2012 09:16 AM by Saren.)
03-22-2012 10:36 AM
Find all posts by this user Quote this message in a reply
pandasFTW Offline
Member

Posts: 71
Joined: Feb 2012
Reputation: 2
Post: #2
RE: Weird error...
can you tell me what the error says??? Smile
03-22-2012 11:49 AM
Find all posts by this user Quote this message in a reply
Saren Offline
Member

Posts: 196
Joined: Jan 2012
Reputation: 1
Post: #3
RE: Weird error...
(03-22-2012 11:49 AM)pandasFTW Wrote:  can you tell me what the error says??? Smile
indeed, if you can make sense of this, you GOT to be some kind of new Einstein... lol
ExecuteString (1,1) ERR: No matching signatures to 'PlayMusic(string@&, const uint)'
ExecuteString (1,1) ERR: No matching signatures to 'StopMusic(string@&, const uint)'
'StopMusic(string@&, string@& const uint)'
main (69,1) ERR Expected ';'

As you can see, makes no sense, I don't even use music.... O.o

03-22-2012 12:10 PM
Find all posts by this user Quote this message in a reply
Obliviator27 Offline
Posting Freak

Posts: 801
Joined: Jul 2011
Reputation: 65
Post: #4
RE: Weird error...
You may have clashing names with the .hps file and another one from a different custom story, or those lines may be hidden elsewhere. Otherwise, your PlaySoundAtEntity line is incorrect, as it should be
PlaySoundAtEntity("", "03_break_wall.snt, "cell_breakable_wall_1", 0, false);
Where the bolded lines are what I changed.

03-22-2012 12:16 PM
Find all posts by this user Quote this message in a reply
Saren Offline
Member

Posts: 196
Joined: Jan 2012
Reputation: 1
Post: #5
RE: Weird error...
(03-22-2012 12:16 PM)Obliviator27 Wrote:  You may have clashing names with the .hps file and another one from a different custom story, or those lines may be hidden elsewhere. Otherwise, your PlaySoundAtEntity line is incorrect, as it should be
PlaySoundAtEntity("", "03_break_wall.snt, "cell_breakable_wall_1", 0, false);
Where the bolded lines are what I changed.
Put in the .snt but no diffrence...

03-22-2012 12:26 PM
Find all posts by this user Quote this message in a reply
Obliviator27 Offline
Posting Freak

Posts: 801
Joined: Jul 2011
Reputation: 65
Post: #6
RE: Weird error...
You probably missed the semicolon at the end. Not sure if you're still getting the PlayMusic error. Perhaps in a previous .hps with it in OnLeave?

03-22-2012 12:32 PM
Find all posts by this user Quote this message in a reply
Saren Offline
Member

Posts: 196
Joined: Jan 2012
Reputation: 1
Post: #7
RE: Weird error...
(03-22-2012 12:32 PM)Obliviator27 Wrote:  You probably missed the semicolon at the end. Not sure if you're still getting the PlayMusic error. Perhaps in a previous .hps with it in OnLeave?
It is the same, yes
but yea, it's the same ending as this 1
void OnLeave()
{
}

03-22-2012 01:52 PM
Find all posts by this user Quote this message in a reply
Saren Offline
Member

Posts: 196
Joined: Jan 2012
Reputation: 1
Post: #8
RE: Weird error...
Soo, no one can help?

03-26-2012 08:02 AM
Find all posts by this user Quote this message in a reply
SilentStriker Offline
Posting Freak

Posts: 939
Joined: Jul 2011
Reputation: 39
Post: #9
RE: Weird error...
you have forgot a semicolon on PlaySoundAtEntity Smile

03-26-2012 08:11 AM
Find all posts by this user Quote this message in a reply
Saren Offline
Member

Posts: 196
Joined: Jan 2012
Reputation: 1
Post: #10
RE: Weird error...
(03-26-2012 08:11 AM)SilentStriker Wrote:  you have forgot a semicolon on PlaySoundAtEntity Smile
Aaaah yea, I see it, thx bro

(This post was last modified: 03-26-2012 08:58 AM by Saren.)
03-26-2012 08:57 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)