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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Major Scripting Error!!!
CookieSoup Offline
Junior Member

Posts: 5
Threads: 1
Joined: Aug 2011
Reputation: 0
#1
Exclamation  Major Scripting Error!!!

So I've been busy with the HPL Editor since yesterday. I created a little map and I have been working on a script for a couple of hours, but I can't get it to work!! As soon as I launch my map i get a fatal error...
Here's my script:

void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea1", "CollideScriptArea1", true, 1);
}

void CollideScriptArea1(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("castle_arched01_1", true, true);
SetPlayerLookAt("castle_arched01_1", 10.0f, 10.0f, "");
PlaySoundAtEntity("", "scare_breath.snt", "Player", 0, false);
AddTimer("", 1.0f, "stoplook");
}

void stoplook(string &in, asTimer)
{
PlayerStopLookAt();
}

-What's wrong with my code?!
-The game points out my faults, but I'm absolutely right i made no mistakes!! I added the error in a thumbnail.


Attached Files
.jpg   FATAL ERROR.jpg (Size: 23.33 KB / Downloads: 80)
08-16-2011, 03:50 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Major Scripting Error!!!

You placed a comma between the variable and the data type for stoplook(). You also misspelled a couple of functions, it is really, StopPlayerLookAt() and StartPlayerLookAt().

Tutorials: From Noob to Pro
(This post was last modified: 08-16-2011, 04:05 PM by Your Computer.)
08-16-2011, 03:59 PM
Website Find
CookieSoup Offline
Junior Member

Posts: 5
Threads: 1
Joined: Aug 2011
Reputation: 0
#3
RE: Major Scripting Error!!!

(08-16-2011, 03:59 PM)Your Computer Wrote: You placed a comma between the variable and the data type for stoplook(). You also misspelled a couple of functions, it is really, StopPlayerLookAt() and StartPlayerLookAt().
Thanks for the reply and pointing out the obvious mistakes I made and should've been able to discover myself. The game still gives me this error that "castle_arched01_1" isn't a matching signature. Why is that? I checked my map editor and the name of the specific door I want the doorslam event to happen on is clearly titled: castle_arched01_1. So I'm quite confused there. /Nevermind I figured it out.
(08-16-2011, 04:14 PM)CookieSoup Wrote:
(08-16-2011, 03:59 PM)Your Computer Wrote: You placed a comma between the variable and the data type for stoplook(). You also misspelled a couple of functions, it is really, StopPlayerLookAt() and StartPlayerLookAt().
Thanks for the reply and pointing out the obvious mistakes I made and should've been able to discover myself. The game still gives me this error that "castle_arched01_1" isn't a matching signature. Why is that? I checked my map editor and the name of the specific door I want the doorslam event to happen on is clearly titled: castle_arched01_1. So I'm quite confused there. /Nevermind I figured it out.

Alright, sorry for bothering whoever is reading this again, but I seem to have a problem again (it'll probably be a very obvious and logical one to solve) but when the script is activated and the door slams shut, the scare_breath sound doesn't play. Is it another spelling mistake, or a wrong order? What is it?
(This post was last modified: 08-16-2011, 04:32 PM by CookieSoup.)
08-16-2011, 04:14 PM
Find




Users browsing this thread: 1 Guest(s)