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
Function Not Calling, But Debug Message Shows Up
AGP Offline
Senior Member

Posts: 448
Threads: 45
Joined: Dec 2012
Reputation: 23
#1
Function Not Calling, But Debug Message Shows Up

Okay, here is my issue:

I have a global variable script for note pick ups. It's the same script used in multiple maps. So far, it works in the first two, but not in the third. I've copied everything over exactly as it is in the others, but the functions just will not call, however the debug message does show up, so now I am majorly confused.

Why will the script work fine in the other two maps, but not this one?

I thought, maybe because this map has music already playing in the background and the others don't, but even then, wouldn't the AddPlayerSanity still call? But nothing happens except the debug message.

void NotePickUp(string &in asEntity, string &in type)
{
    AddGlobalVarInt("Notes", 1);  
  
    if(GetGlobalVarInt("Notes") == 20)
    {
        SetEntityActive("blueboy", true);
    }
    
    PlayMusic("myuu_nightmares_loop", true, 0.5f, 0.0f, 1, false);
    
    AddTimer("stoploop", 1.5f, "EndLoop");
    
    AddPlayerSanity(25);
    AddDebugMessage("DeBug", true);
}

void EndLoop(string &in asTimer)
{
    StopMusic(1.5f, 1);
}

06-18-2017, 06:39 PM
Find


Messages In This Thread
Function Not Calling, But Debug Message Shows Up - by AGP - 06-18-2017, 06:39 PM



Users browsing this thread: 1 Guest(s)