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
Coding Problem
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#4
RE: Coding Problem

Actually, that's not the problem.

When your extension is .rtf, no scripts will occur in the map because the .rtf extension makes Amnesia think that there are no scripts, so it stops looking for the .hps file. But because your .hps has returned an error on load, then that means there is something wrong, and I believe this is your error:

PHP Code: (Select All)
void FUNCTION (string &in itemstring &in door

The syntax of your code here is incorrect. What that means is while the void FUNCTION part is okay, the values in your brackets are wrong. If you check the Engine Scripts page, you can see that the Callback syntax for AddUseItemCallback is this:

void MyFunc(string &in asItem, string &in asEntity)

That means your code should be this:
PHP Code: (Select All)
void FUNCTION(string &in asItemstring &in asEntity)
{
SetLevelDoorLocked ("level_wood_1"false); 
PlayGuiSound ("unlock_door.snt"100); 
RemoveItem ("key_study_1");


There may be other errors which I can potentially see (remember to change your quotation marks), but if you fix that and your quote marks, the other errors may not apply.

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 10-02-2015, 05:20 AM by Romulator.)
10-02-2015, 05:19 AM
Find


Messages In This Thread
Coding Problem - by hananh129 - 10-02-2015, 04:00 AM
RE: Coding Problem - by Romulator - 10-02-2015, 04:50 AM
RE: Coding Problem - by hananh129 - 10-02-2015, 05:09 AM
RE: Coding Problem - by Romulator - 10-02-2015, 05:19 AM
RE: Coding Problem - by hananh129 - 10-02-2015, 05:27 AM
RE: Coding Problem - by Romulator - 10-02-2015, 05:45 AM
RE: Coding Problem - by hananh129 - 10-02-2015, 05:48 AM
RE: Coding Problem - by Romulator - 10-02-2015, 06:15 AM
RE: Coding Problem - by hananh129 - 10-02-2015, 06:22 AM
RE: Coding Problem - by Romulator - 10-02-2015, 06:36 AM
RE: Coding Problem - by hananh129 - 10-02-2015, 06:42 AM
RE: Coding Problem - by Romulator - 10-02-2015, 06:51 AM
RE: Coding Problem - by Mudbill - 10-02-2015, 10:19 AM



Users browsing this thread: 1 Guest(s)