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
Start-up error
schwem00 Offline
Junior Member

Posts: 4
Threads: 2
Joined: Sep 2013
Reputation: 0
#1
Start-up error

I just started working on the scripting portion of my new (and first) CS after looking at some wiki tutorials, and I cant seem to start up my game ever since I started scripting. The screen goes black and no error message pops up, so I have no idea what is wrong. Here is my code.

void OnStart()
{
SetEntityConnectionStateChangeCallback("lever", "func_shelf");
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
AddUseItemCallback("", "key_1", "lockeddoor_1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "unlockeddoor_1", 0.0f, false);
RemoveItem("key_1");
AddDebugMessage("KeyOnDoor", false);

}
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0.001, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0.001, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0.001, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0.001, "");
    SetEntityActive("servant_grunt_1", true);
}

void func_shelf(string &in asEntity, int alState)
{
     if (alState == 1)
     {
     SetMoveObjectState("secret_door",1.0f);
     PlaySoundAtEntity("", "quest_completed.snt", "shelf_move_1", 0, false);
          return;
     }
}
void OnEnter()
{

}
void OnLeave()
{

}

Does anyone see whats wrong with this? Thanks in advance!
(This post was last modified: 09-26-2013, 12:07 AM by schwem00.)
09-25-2013, 01:04 AM
Find


Messages In This Thread
Start-up error - by schwem00 - 09-25-2013, 01:04 AM
RE: Start-up error - by Rapture - 09-25-2013, 02:14 AM
RE: Start-up error - by schwem00 - 09-25-2013, 08:25 PM



Users browsing this thread: 1 Guest(s)