The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Script Help I cant find the unexpected token! Help please :)
Loveridge Offline
Junior Member

Posts: 21
Threads: 8
Joined: Nov 2011
Reputation: 0
#1
I cant find the unexpected token! Help please :)

Okay ive gone through this a million times xD but all i get when running is "Unexpected token "{" it seems to be near the end by the "void func" but i cant get it to work. If you can show me whats wrong itll be much appreciated Smile




////////////////////////////
// Run when entering map
void OnEnter()

{
AddEntityCollideCallback("Player", "script_slam", "func_slam", true, 1);
}

void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("Door_1", true, true);

PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);

PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);






GiveSanityDamage(50.0f, true);
}

void OnStart()
{
AddUseItemCallback("","crowbar_1", "cdoor", "FUNCTION", true);
}

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

AddEntityCollideCallback("Player", "doorslam2", "func_slam", true, 1);
}
void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("slamdoor2", true, true);

PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);

PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);

GiveSanityDamage(50.0f, true);
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
12-06-2011, 09:20 PM
Find


Messages In This Thread
I cant find the unexpected token! Help please :) - by Loveridge - 12-06-2011, 09:20 PM



Users browsing this thread: 1 Guest(s)