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:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Problem...please help?
SonOfLiberty796 Offline
Senior Member

Posts: 371
Threads: 39
Joined: Aug 2011
Reputation: 2
#1
Script Problem...please help?

////////////////////////////
// Run when entering map
void OnEnter()
{
        PlayMusic("amb_safe.ogg", true, 0.5, 5, 0, true);
        GivePlayerDamage(50, "", false, true);
        AddUseItemCallback("", "crowbar", "closet", "KeyOnDoor1", true);
        AddUseItemCallback("", "HallKey", "hall", "KeyOnDoor2", true);
        AddUseItemCallback("", "artroomkey", "artroom", "KeyOnDoor3", true);
        AddUseItemCallback("", "pathwaytolabkey", "pathtolab", "KeyOnDoor4", true);
        SetLevelDoorLockedText("pathtolab", "Doors", "Door_pathtolab_Name");
        SetLevelDoorLockedText("frontdoor", "Doors", "Door_frontdoor_Name");
        AddEntityCollideCallback("Player", "readnote", "AddQuest", true, 1);
        AddEntityCollideCallback("Player", "nighttime", "SetMessage", true, 1);
        SetEntityCallbackFunc("fromfriend", "OnPickup");
        SetEntityCallbackFunc("lantern", "OnPickup1");
        SetMessage("MessageDisplay", "Message_wakingup_Name", 5.0f);
        StartPlayerLookAt("fromfriend", 2.0f, 2.0f, "");
        AddTimer("", 5.0f, "stoplook");
}

void     SetMessage(string& asTextCategory, string& asTextEntry, float afTime);
{
        SetMessage("MessageDisplay", "Message_nighttime_Name", 5.0f);
}

The problem is the "void SetMessage (and so on till the } bracket)". Everytime i run the map with this command, it crashes and gives me an error, however, when i remove it, it runs perfectly normal...can anyone help me and see whats the problem? thanks.

BTW, i included a picture of the error it gives me.
(This post was last modified: 08-10-2011, 07:51 PM by SonOfLiberty796.)
08-10-2011, 06:14 AM
Find


Messages In This Thread
Script Problem...please help? - by SonOfLiberty796 - 08-10-2011, 06:14 AM
RE: Script Problem...please help? - by palistov - 08-10-2011, 07:22 AM



Users browsing this thread: 1 Guest(s)