ItsMods

Full Version: Maximum Parent Script Variables
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
[Image: be16859e9312850eb644715e721c8b54.png]
This is has to be the last bug in the mod... and it's quite annoying. We got the HUD to fix by removing old HUDElem code.
You have developer and developer_script on, right?
As i said in steam, you have loop without wait. ( somewhere )
I had same error when i was modding mw2/bo.

OR just too many shit in code.
JayDi, what you are saying (at least the first part) makes completely no sense.

A quick google search which took me 5seconds showed me this result: http://fourdeltaone.net/forum/viewtopic....550#p43556
(11-03-2012, 18:23)JayDi Wrote: [ -> ]As i said in steam, you have loop without wait. ( somewhere )
I had same error when i was modding mw2/bo.

OR just too many shit in code.

Wouldn't it show "possible infinite loop detected" if he had no wait statements?

And your second answer is retarded
Anyway I fixed -possibly- we forgot to add else statements to the pages that's why sometimes when we switch pages the text stayed and there was an ERROR 0 or 1 in the pages. You guys can lock this Big Grin
Well... this issue is back again. Anyone else have any ideas on why? Could it be from the custom HUD/ammo counter we've used?
(11-15-2012, 01:59)DidUknowiPwn Wrote: [ -> ]Well... this issue is back again. Anyone else have any ideas on why? Could it be from the custom HUD/ammo counter we've used?
Ok, check if there is wait at the end of every loop,
Check if there wasn't too much HUD elements in the mod

If this didn't work, then you could paste your code through steam: Ra3shed

Hope helped Sleepy
Well seeing as the mod is basically _rank.gac I'm sure you don't want 7K lines of code on Steam....
Okay whatever my only conclusion it's the Custom HUD we have. Anyone mind checking this?
Code:
weaponHudInit()
{
    level.weaponicon = [];
    // precache
    precacheShader("hud_us_grenade");
    precacheShader("hud_us_semtex");
    precacheShader("hud_icon_claymore");
    precacheShader("hud_icon_c4");
    precacheShader("weapon_attachment_tactical");
    // equipment
    level.weaponicon["frag"] = "hud_us_grenade";
    level.weaponicon["semtex"] = "hud_us_semtex";
    level.weaponicon["claymore"] = "hud_icon_claymore";
    level.weaponicon["c4"] = "hud_icon_c4";
    level.weaponicon["throwingknife"] = "weapon_attachment_tactical";
}

getWeaponIcon(name)
{
    base = strtok(name , "_")[0];
    ret = level.weaponicon[base];
    if(!isDefined(ret))
        return "None";
    return ret;
}

AmmoHud()
{
    self endon("disconnect");
    self endon("death");
    if(!isDefined(self.ammoBoard))
    {
        self.ammoBoard = self createFontString( "default", 1.7 );
        self.ammoBoard setPoint( "BOTTOMRIGHT", "BOTTOMRIGHT", -55, -40);
        self.ammoBoard.HideWhenInMenu = true;
    }
    if(!isDefined(self.stockBoard))
    {
        self.stockBoard = self createFontString( "default", 2 );
        self.stockBoard setPoint( "BOTTOMRIGHT", "BOTTOMRIGHT", -18, -40);
        self.stockBoard.HideWhenInMenu = true;
    }
    if(!isDefined(self.slash))
    {
        self.slash = self createFontString( "default", 1.9 );
        self.slash setPoint( "BOTTOMRIGHT", "BOTTOMRIGHT", -45, -40);
        self.slash.HideWhenInMenu = true;
    }
    
    if(!isDefined(self.nadeseperator))
    {
        self.nadeseperator = self createFontString( "default", 1.9 );
        self.nadeseperator setPoint( "BOTTOMRIGHT", "BOTTOMRIGHT", -43, -60);
        self.nadeseperator.HideWhenInMenu = true;
        self.nadeseperator.sort = -9999999;
    }
    if(!isDefined(self.equipmentcount))
    {
        self.equipmentcount = self createFontString( "default" , 1.9);
        self.equipmentcount setPoint( "BOTTOMRIGHT", "BOTTOMRIGHT", -30, -60);
        self.equipmentcount.HideWhenInMenu = true;
        self.equipmentcount.sort = -9999999;
    }
    
    // do every time you spawn to make sure it resets
    self.nadeicon destroy();
    self.grenade = level.nadetypes[self.nadetype];
    self.nadeicon = self createIcon(getWeaponIcon(self.grenade), 16, 16);
    self.nadeicon setPoint("BOTTOMRIGHT", "BOTTOMRIGHT", -55, -60);
    self.nadeicon.alpha = 1;
    self.nadeicon.sort = -9999999;
    self.nadeicon.HideWhenInMenu = true;
    lastequipment = self.grenade;
    
    while(1)
    {
        self.grenade = level.nadetypes[self.nadetype];
        if(self.team == "axis")
        {
            self.grenade = "throwingknife_mp";
            self.nades = 0;
        }
        self.Clip = self getWeaponAmmoClip(self getCurrentWeapon());
        self.Stock = self getWeaponAmmoStock(self getCurrentWeapon());
        if(self.Stock >= 100)
        {
            self.stockBoard.fontscale = 1.7;
        }
        else
        {
            self.stockBoard.fontscale = 2;
        }
        self.ammoBoard setValue(self.Clip);
        self.stockBoard setValue(self.Stock);
        //self.slash setText("/");
        self.nadeseperator setText("x\n/");
        
        nadeclip = self getWeaponAmmoClip(self.grenade);
        if(!isDefined(self.nades))
            self.equipmentcount setValue(0);
        else if (!isDefined(nadeclip))
            self.equipmentcount setValue(self.nades);
        else
            self.equipmentcount setValue(self.nades + nadeclip);
        
        if(lastequipment != self.grenade)
        {
            self.nadeicon destroy();
            self.nadeicon = self createIcon(getWeaponIcon(self.grenade), 16, 16);
            self.nadeicon setPoint("BOTTOMRIGHT", "BOTTOMRIGHT", -55, -60);
            self.nadeicon.alpha = 1;
            self.nadeicon.sort = -9999999;
            self.nadeicon.HideWhenInMenu = true;
        }
        
        wait 0.1;
    }
}
Or http://pastebin.com/shgVQLbm
Pages: 1 2