Raised This Month: $128 Target: $400

Solved Cannot fire input

Post New Thread Reply   
Thread Tools Display Modes
Author Message
Junior Member
Join Date: Apr 2020
Old 08-29-2020 , 21:44   Cannot fire input
Reply With Quote #1

The map has 3 func_button's with targetname of "addbutton" and I am trying to color all of them.
I know of SetVariantColor but I made FireInputOn for other entities, inputs and delays.
The problem is that it only colors the first one it finds and then error.
Thanks in advanced.

[SM] Exception reported: Tracker stack is out of bounds
[SM] Blaming: Plugin.smx
[SM] Call stack trace:
[SM]   [1] AcceptEntityInput(entity, "FireUser1");
[SM]   [2] FireInputOn("addbutton", "Color", "0 100 0", "0", "-1");
public void OnPluginStart()
    HookEvent("teamplay_round_start", Event_RoundStart);

public Action Event_RoundStart(Event event, const char[] name, bool dontBroadcast)
    FireInputOn("addbutton", "Color", "0 100 0", "0", "-1");

void FireInputOn(const char[] targetName, const char[] input, const char[] value, const char[] delay, const char[] maxTimes)
    int max = (GetMaxEntities() * 2);
    int found = 0;
    int[] foundEntities = new int[max];
    for (int i = 0; i < max; i++) {
        if (!IsValidEntity(i)) continue;
        char name[128];
        GetEntPropString(i, Prop_Data, "m_iName", name, sizeof(name));
        if (StrEqual(name, targetName)) foundEntities[found++] = i;
    for (int i = 0; i < found; i++) {
        int entity = foundEntities[i];
        char[] fullInput = "";
        // Format(fullInput, 1024, "%s !self:%s:%s:%s:%s", input, input, value, delay, maxTimes);
        Format(fullInput, 1024, "OnUser1 !self:%s:%s:%s:%s", input, value, delay, maxTimes);

        // AcceptEntityInput(entity, input);
        AcceptEntityInput(entity, "AddOutput");
        AcceptEntityInput(entity, "FireUser1");

Last edited by blacktr4sh; 08-31-2020 at 12:24.
blacktr4sh is offline

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -4. The time now is 11:48.

Powered by vBulletin®
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Theme made by Freecode