UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Cast undefined to bool

broken avatar :(
Created 9 years ago
by Tim Smith
0 Members and 1 Guest are viewing this topic.
5,269 views
broken avatar :(
×
broken avatar :(
Location: gbNewport
Date Registered: 2 November 2014
Last active: 2 years ago
Posts
1,265
Respect
Forum Rank
Zombie Colossus
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Embrace the Darkness
×
Tim Smith's Groups
Tim Smith's Contact & Social Linkstimsmith90THEREALBaDBoY17TimSmithMy clan Website
Hi , I have been working on my map and the last compile and build made my game crash when I click on the solo button  :poker:

And after I lunched it with developer 1 it gave me this error

***************
Script runtime error
Cannot cast undefined to bool
***************
How should I fix this. :(
This topic contains a post which is marked as the Best Answer. Click here to view it.
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 8 years ago
Posts
2,790
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
Signature
Let's keep this thread on topic from here on in. -DBZ

+1 to off-topic reply -DBZ

lmao. Too funny.

Goliath Script Placer: http://ugx-mods.com/forum/index.php/topic,11234.msg125257/topicseen.html#new

"...Christ, people. Learn C, instead of just stringing random characters
together until it compiles (with warnings)..."

-Linus Torvalds
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
Anything else in the console? What about if you set developer_script to 1?
broken avatar :(
×
broken avatar :(
Location: gbNewport
Date Registered: 2 November 2014
Last active: 2 years ago
Posts
1,265
Respect
Forum Rank
Zombie Colossus
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Embrace the Darkness
×
Tim Smith's Groups
Tim Smith's Contact & Social Linkstimsmith90THEREALBaDBoY17TimSmithMy clan Website
Anything else in the console? What about if you set developer_script to 1?

no it doesn't give anything else except for these

Code Snippet
Plaintext
(see console for details)
cannot cast undefined to bool
********************
ERROR: script runtime error
(see console for details)
cannot cast undefined to bool
********************

----------------------

******* script runtime error *******
cannot cast undefined to bool: (file 'common_scripts/utility.gsc', line 463)
 while( !level.flag[ msg ] )
        *
Error: called from:
(file 'maps/heros.gsc', line 376)
     flag_wait( "all_players_spawned" );
     *
Error: called from:
(file 'maps/heros.gsc', line 125)
 level thread teleporter_intro();
              *
Error: started from:
(file 'maps/heros.gsc', line 23)
main()
*

but these are random errors and the maps runs with these errors and yeah i also added developer_script 1 and it also giving me these
Last Edit: June 22, 2015, 07:34:24 pm by lukkie1998
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 7 months ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
Signature
Do not take life too seriously. You will never get out of it alive.
×
DidUknowiPwn's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Call those AFTER maps\_load::main(); (from your map GSC).
broken avatar :(
×
broken avatar :(
Location: gbNewport
Date Registered: 2 November 2014
Last active: 2 years ago
Posts
1,265
Respect
Forum Rank
Zombie Colossus
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Embrace the Darkness
×
Tim Smith's Groups
Tim Smith's Contact & Social Linkstimsmith90THEREALBaDBoY17TimSmithMy clan Website
Call those AFTER maps\_load::main(); (from your map GSC).

here's my mapname.gsc everything is called and everything is ok in my.gsc

Code Snippet
Plaintext
/*
   Der Frost / Nazi Zombie Sniperbolt Tutorial Version 2.0
      Scripter: Sparks
      Tutorial: Sniperbolt

   Version 1.0 (9/24/2009 7:51:18 PM)
      -- Initial Release Of Source Files
*/

// Tutorial From Sniperbolt!

// Utilities
#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;
#include maps\_zombiemode_zone_manager;
#include maps\_music;

// DLC3 Utilities
#include maps\dlc3_code;
#include maps\dlc3_teleporter;

main()
{
   level.DLC3 = spawnStruct(); // Leave This Line Or Else It Breaks Everything
   
   // Must Change These To Your Maps
   level.DLC3.createArt = maps\createart\Heros_art::main;
   level.DLC3.createFX = maps\createfx\Heros_fx::main;
   level.DLC3.myFX = ::preCacheMyFX;
   
   
   /*--------------------
    FX
   ----------------------*/
   DLC3_FX();
   
   /*--------------------
    LEVEL VARIABLES
   ----------------------*/   
   
   // Variable Containing Helpful Text For Modders -- Don't Remove
   level.modderHelpText = [];
   
   //
   // Change Or Tweak All Of These LEVEL.DLC3 Variables Below For Your Level If You Wish
   //
   
   // Edit The Value In Mod.STR For Your Level Introscreen Place
   level.DLC3.introString = &"nazi zombie tes";
   
   // Weapons. Pointer function automatically loads weapons used in Der Riese.
   level.DLC3.weapons = maps\dlc3_code::include_weapons;
   
   // Power Ups. Pointer function automatically loads power ups used in Der Riese.
   level.DLC3.powerUps =  maps\dlc3_code::include_powerups;
   
   // Adjusts how much melee damage a player with the perk will do, needs only be set once. Stock is 1000.
   level.DLC3.perk_altMeleeDamage = 1000;
   
   // Adjusts barrier search override. Stock is 400.
   level.DLC3.barrierSearchOverride = 400;
   
   // Adjusts power up drop max per round. Stock is 3.
   level.DLC3.powerUpDropMax = 3;
   
   // _loadout Variables
   level.DLC3.useCoopHeroes = true;
   
   // Bridge Feature
   level.DLC3.useBridge = false;
   
   // Hell Hounds
   level.DLC3.useHellHounds = true;
   
   // Mixed Rounds
   level.DLC3.useMixedRounds = true;
   
   // Magic Boxes -- The Script_Noteworthy Value Names On Purchase Trigger In Radiant
   boxArray = [];
   boxArray[ boxArray.size ] = "start_chest";
   boxArray[ boxArray.size ] = "chest1";
   boxArray[ boxArray.size ] = "chest2";
   boxArray[ boxArray.size ] = "chest3";
   boxArray[ boxArray.size ] = "chest4";
   boxArray[ boxArray.size ] = "chest5";
   level.DLC3.PandoraBoxes = boxArray;
   
   // Initial Zone(s) -- Zone(s) You Want Activated At Map Start
   zones = [];
   zones[ zones.size ] = "start_zone";
   level.DLC3.initialZones = zones;
   
   // Electricity Switch -- If False Map Will Start With Power On
   level.DLC3.useElectricSwitch = true;
   
   // Electric Traps
   level.DLC3.useElectricTraps = true;
   
   // _zombiemode_weapons Variables
   level.DLC3.usePandoraBoxLight = true;
   level.DLC3.useChestPulls = true;
   level.DLC3.useChestMoves = true;
   level.DLC3.useWeaponSpawn = true;
   level.DLC3.useGiveWeapon = true;
   
   // _zombiemode_spawner Varibles
   level.DLC3.riserZombiesGoToDoorsFirst = true;
   level.DLC3.riserZombiesInActiveZonesOnly = true;
   level.DLC3.assureNodes = true;
   
   // _zombiemode_perks Variables
   level.DLC3.perksNeedPowerOn = true;
   
   // _zombiemode_devgui Variables
   level.DLC3.powerSwitch = true;
   
   // Snow Feature
   level.DLC3.useSnow = true;
   
   /*--------------------
    FUNCTION CALLS - PRE _Load
   ----------------------*/
   level thread DLC3_threadCalls();   
   level thread teleporter_intro();
   maps\_buildables::main();
   //thread hidden_song();
   //maps\_jump_scare::main();
   maps\_character_randomize::init();
   /*--------------------
    ZOMBIE MODE
   ----------------------*/
   [[level.DLC3.weapons]]();
   [[level.DLC3.powerUps]]();
   //////////////////////////////////////////////////
   //Music Player .gsc
   //////////////////////////////////////////////////
   preCacheModel ("zombie_zapper_cagelight_green");
   game["tom_music_player"] = "tom_music_player";
   PrecacheMenu( game["tom_music_player"] );
   level thread maps\tom_music_player_unl::main();
   precacheShader( "damage_feedback" );
   //maps\_soul_chest::PreCache_soul_chest();
   maps\_zombiemode::main();
   //thread pregame_message();
   level thread maps\ScoreSolo::CheckScore();
   //thread maps\_soul_chest::main();
   level.give_ammo = 0;
   ammo_trigs = getentarray("give_ammo","targetname");
   array_thread(ammo_trigs,::give_ammo);
   level thread HitTest();
   thread bears();
   level maps\points_des::main();
   level.tom_victory = false;
   end_trig = getentarray( "end_game","targetname" );
   array_thread( end_trig,::end_game );
   //laser_trigger = getentarray( "laser_trigger","targetname" );
   //array_thread( laser_trigger,::laser_trig );
   maps\_zombiemode_perks_black_ops::bo_perks_thread();
   //thread anti_cheat();
   thread maps\_kinostyle_teleporter::init();   
   thread zombiesleft_hud();
   thread beta_hud();
   thread reward();
   //thread no_cheat();
   phil_ally_guys_idle_fix();
   /*--------------------
    FUNCTION CALLS - POST _Load
   ----------------------*/
   level.zone_manager_init_func = ::dlc3_zone_init;
   level thread DLC3_threadCalls2();
   level thread phil_typewriter_intro();
   thread zk_shootable_door();
   thread zk_shootable_door1();
   thread zk_shootable_door2();
   //thread bank_begin();
   //thread weapon_locker_begin();

}

dlc3_zone_init()
{

   add_adjacent_zone( "start_zone", "zone1", "enter_zone1" );
   add_adjacent_zone( "zone1", "zone2", "enter_zone2" );
   add_adjacent_zone( "zone2", "zone3", "enter_zone3" );
   add_adjacent_zone( "zone3", "zone4", "enter_zone4" );
   /*
   =============
   ///ScriptDocBegin
   "Name: add_adjacent_zone( <zone_1>, <zone_2>, <flag>, <one_way> )"
   "Summary: Sets up adjacent zones."
   "MandatoryArg: <zone_1>: Name of first Info_Volume"
   "MandatoryArg: <zone_2>: Name of second Info_Volume"
   "MandatoryArg: <flag>: Flag to be set to initiate zones"
   "OptionalArg: <one_way>: Make <zone_1> adjacent to <zone_2>. Defaults to false."
   "Example: add_adjacent_zone( "receiver_zone",      "outside_east_zone",   "enter_outside_east" );"
   ///ScriptDocEnd
   =============
   */

   // Outside East Door
   //add_adjacent_zone( "receiver_zone",      "outside_east_zone",   "enter_outside_east" );
}

anti_cheat()
{
   setdvar ("god", "Not Allowed");
   setdvar ("ufo", "Not Allowed");
   setdvar ("noclip", "Not Allowed");
   setdvar ("give", "Not Allowed");
   setdvar ("demigod", "Not Allowed");
   setdvar ("notarget", "Not Allowed");
   setdvar ("jumptonode", "Not Allowed");
   setdvar ("thereisacow", "Not Allowed");
   setdvar ("player_sprintunlimited", "Not Allowed");
   setdvar ("sf_use_ignoreammo", "Not Allowed");
   

   // floating
   meleedamage = getdvar ("player_meleedamagemultiplier");
   res_range = getdvar ("player_revivetriggerRadius"); 
   bleed_out = getdvar ("player_laststandbleedouttime");
   melee_range = getdvar ("player_meleerange");
   clip_size = getdvar ("player_clipsizemultiplier");
   speed = getdvar ("g_speed");
   gravity = getdvar ("g_gravity");
   death_delay = getdvar ("g_deathdelay");
   perk_1 = getdvar ("perk_overheatreduction");
   arcade = getdvar ("arcademode_score_revive");
   ammo = getdvar ("player_sustainammo");
while(1)
   {
   if( GetDvarInt( "player_meleedamagemultiplier" ) != meleedamage ||
      GetDvarInt( "player_revivetriggerRadius" ) != res_range ||
      GetDvarInt( "player_laststandbleedouttime" ) != bleed_out ||
      GetDvarInt( "player_meleerange" ) != melee_range ||
      GetDvarInt( "player_clipsizemultiplier" ) != clip_size ||
      GetDvarInt( "g_speed" ) != speed ||
      GetDvarInt( "g_gravity" ) != gravity ||
      GetDvarInt( "g_deathdelay" ) != death_delay ||
      GetDvarInt( "perk_overheatreduction" ) != perk_1 ||
      GetDvarInt( "arcademode_score_revive" ) != arcade ||
      GetDvarInt( "player_sustainammo" ) != ammo)
      {
         setsaveddvar ("player_meleedamagemultiplier", "0.4");
         setsaveddvar ("player_revivetriggerRadius", "64");
         setsaveddvar ("player_laststandbleedouttime", "30");
         setsaveddvar ("player_meleerange", "64");
         setsaveddvar ("player_clipsizemultiplier", "1");
         setsaveddvar ("g_speed", "190");
         setsaveddvar ("g_gravity", "800");
         setsaveddvar ("g_deathdelay", "4000");
         setsaveddvar ("perk_overheatreduction", "0.7");
         setsaveddvar ("arcademode_score_revive", "100");
         setsaveddvar ("player_sustainammo", "0");
      }
   wait 1;
   }
}

// Typewriter style intro text - YaPh1l
phil_typewriter_intro()
{
    text = [];
    text[text.size] = "^4Welcome To Heros";
    text[text.size] = "^1We All Could Be... Heros!!";
    text[text.size] = "^3Just Let Gunns Drink His Cherry Daiquiri";
    text[text.size] = "^5The Teddy Is a Liar Don't Trust Him , He will Get You Killed";

    intro_hud = [];
    for(i = 0;  i < text.size; i++)
    {
        intro_hud[i] = create_simple_hud();
        intro_hud[i].alignX = "left";
        intro_hud[i].alignY = "bottom";
        intro_hud[i].horzAlign = "left";
        intro_hud[i].vertAlign = "bottom";
        intro_hud[i].foreground = true;
        intro_hud[i].sort = 100;

        if ( level.splitscreen && !level.hidef )
        {
            intro_hud[i].fontScale = 2.75;
        }
        else
        {
            intro_hud[i].fontScale = 1.75;
        }
        intro_hud[i].alpha = 1;
        intro_hud[i].color = (1, 1, 1);
        intro_hud[i].y = -110 + 20 * i;
    }

    for(i = 0 ; i < text.size; i++)
    {
        intro_hud[i].label = "";
        for(k = 0; k <= text[i].size; k++)
        {
            intro_hud[i].label = GetSubStr(text[i], 0, k);
            PlaySoundAtPosition("typewriter", (0, 0, 0));
            wait(0.1);
        }
        wait(1.5);
    }
    wait(1.5);
    for(i = 0 ; i < text.size; i++)
    {
        intro_hud[i] FadeOverTime( 3.5 );
        intro_hud[i].alpha = 0;
        wait(1.5);
    }   
    wait(2);
    for(i = 0 ; i < text.size; i++)
    {
        intro_hud[i] destroy_hud();
    }
}

zombiesleft_hud()
{   
   Remaining = create_simple_hud();
     Remaining.horzAlign = "center";
     Remaining.vertAlign = "middle";
      Remaining.alignX = "Left";
      Remaining.alignY = "middle";
      Remaining.y = 230;
      Remaining.x = 60;
      Remaining.foreground = 1;
      Remaining.fontscale = 8.0;
      Remaining.alpha = 1;
      Remaining.color = ( 0.423, 0.004, 0 );


      ZombiesLeft = create_simple_hud();
      ZombiesLeft.horzAlign = "center";
      ZombiesLeft.vertAlign = "middle";
      ZombiesLeft.alignX = "center";
      ZombiesLeft.alignY = "middle";
      ZombiesLeft.y = 230;
      ZombiesLeft.x = -1;
      ZombiesLeft.foreground = 1;
      ZombiesLeft.fontscale = 8.0;
      ZombiesLeft.alpha = 1;
      ZombiesLeft.color = ( 0.423, 0.004, 0 );
      ZombiesLeft SetText("^4 Heros Walking:^1 ");


   while(1)
   {
      remainingZombies = get_enemy_count() + level.zombie_total;
      Remaining SetValue(remainingZombies);

      if(remainingZombies == 0 )
         {
         Remaining.alpha = 0;
         while(1)
            {
               remainingZombies = get_enemy_count() + level.zombie_total;
               if(remainingZombies != 0 )
               {
               Remaining.alpha = 1;
               break;
               }
               wait 0.5;
            }
         }
      wait 0.5;
   }
}

teleporter_intro()
{
       flag_wait( "all_players_spawned" );

       wait( 0.25 );

       players = get_players();
       for ( i = 0; i < players.size; i++ )
       {   
           wait (0.1);
           players[i] SetTransported( 2 );
       }
   
           wait (0.1);

       self SetTransported( 2 );
   
       playsoundatposition( "evt_beam_fx_2d", (0,0,0) );
       playsoundatposition( "evt_pad_cooldown_2d", (0,0,0) );

           wait (0.1);
}

preCacheMyFX()
{
   // LEVEL SPECIFIC - FEEL FREE TO REMOVE/EDIT
   
   level._effect["snow_thick"]         = LoadFx ( "env/weather/fx_snow_blizzard_intense" );
}

Laser_trig()
{
   who = undefined;
   self sethintstring("Press &&1 to Disable laser sight.");
   self SetCursorHint( "HINT_NOICON" );
   self UseTriggerRequireLookAt();

   laser();

      while(1)
      {
          self waittill( "trigger", who );

            if(!who.laserOn)
           {
                self sethintstring("Press &&1 to Enable laser sight");
               who setClientDvar( "cg_laserForceOn", 1 );
               who.laserOn = true;
           }
           else
           {
                self sethintstring("Press &&1 to Disable laser sight");
                who setClientDvar( "cg_laserForceOn", 0 );
               who.laserOn = false;
           }
      who playsound( "cha_ching" );
      }
}

Laser()
{
   players = get_players();
   for( i = 0; i < players.size; i++ )
   {
      players[i].laseron = false;
      players[i] thread _laser();
   }
}

_laser()
{
      while(1)
      {
     if( !(self IsThrowingGrenade() ))
     {
      if(!self.laserOn)
           {
         self setClientDvar( "cg_laserForceOn", 1 );
      }
      else
      {
         self setClientDvar( "cg_laserForceOn", 0 );
      }
     }
     else
     {
      self setClientDvar( "cg_laserForceOn", 0 );
     }
     wait 0.5;
      }
}

end_game()
{
   user = undefined;
   cost = 22000;                              //change to cost that you want

   self setCursorHint("HINT_NOICON");
   self UseTriggerRequireLookAt();
   self setHintString("^4The power must be activated first");            //remove line if you want it to work without power

   flag_wait( "electricity_on" );                        //remove line if you want it to work without power

   self setHintString("^1press &&1 to Drink The Cherry Daiquiri And Go Home [Cost: "+cost+"]");         //text hint trigger

   while(1)
   {
      self waittill("trigger", user);
      if( is_player_valid(user) && user.score >= cost )
      {
         play_sound_at_pos( "cha_ching", self.origin );
         user thread maps\_zombiemode_score::minus_to_player_score( cost );
         self delete();

         level notify( "end_game" );
         level.tom_victory = true;
      }
      else
      {
         play_sound_at_pos( "no_cha_ching", self.origin );
      }
   }
}

zk_shootable_door()
{
   door = getEnt("shootable_door", "targetname");     //this will be the door that opens
   shoot_me = getEnt("shoot_me", "targetname");   //this is the trigger that you shoot

   flag_wait("all_players_connected");
   door moveZ(0, 0);

   shoot_me waittill("trigger");
   shoot_me delete();
   play_sound_at_pos("door_slide_open", door.origin);
   door MoveZ (-900, 25);
   //door MoveY (500, 20);
   //door MoveX (500, 20);
   iprintln("^1Move Along Dude , You Opened The Jug Door"); //remove this line if you don't want it to say that
   wait 5;
   iprintln("Go Buy It What are You Waiting for , Durb");
   wait 8;
}

zk_shootable_door1()
{
   door = getEnt("shootable_door1", "targetname");     //this will be the door that opens
   shoot_me = getEnt("shoot_me1", "targetname");   //this is the trigger that you shoot

   flag_wait("all_players_connected");
   door moveZ(0, 0);

   shoot_me waittill("trigger");
   shoot_me delete();
   play_sound_at_pos("door_slide_open", door.origin);
   door MoveZ (-900, 25);
   //door MoveY (500, 20);
   //door MoveX (500, 20);
   iprintln("^5Nice , You Opend The Pack-A-Punch Door"); //remove this line if you don't want it to say that
   wait 4;
   iprintln("^4I Suggest you Get The ^1PYTHON^4 and PAP it");
   wait 4;
}

zk_shootable_door2()
{
   door = getEnt("shootable_door2", "targetname");     //this will be the door that opens
   shoot_me = getEnt("shoot_me2", "targetname");   //this is the trigger that you shoot

   flag_wait("all_players_connected");
   door moveZ(0, 0);

   shoot_me waittill("trigger");
   shoot_me delete();
   play_sound_at_pos("door_slide_open", door.origin);
   door MoveZ (-900, 25);
   //door MoveY (500, 20);
   //door MoveX (500, 20);
   iprintln("^1Nothing To See here , Move Along"); //remove this line if you don't want it to say that
   wait 6;
   iprintln("And By The Way BrotherGunns Stop Dating and Start Shooting Can You ?? Thx");
   wait 10;
}

hidden_song()
{
   count = 0;
   trig1 = getEnt("trig1", "targetname");
   trig2 = getEnt("trig2", "targetname");
   trig3 = getEnt("trig3", "targetname");
   trig1 setHintString("^4Music!! ?", true );
   trig2 setHintString("^1Music!! ?", true );
   trig3 setHintString("^6Music!! ?", true );
   self thread tim( trig1 );
   self thread tim( trig2 );
   self thread tim( trig3 );
   while(1)
   {
      wait 1;
      self waittill( "got_easter" );
      count = count+1;
      if( count == 3 )
      {
         players = get_players();
         for(k=0;k<players.size;k++)
         {
            players[k] playsound("tim");
            iprintlnbold("^1Great Job Dude!");
         }
         break;
      }
   }
}

tim( trig )
{
   trig waittill( "trigger", player );
   trig delete();
   iprintlnbold("^1Music Time!");
   self notify( "got_easter" );     
}

bears()
{   
   count = 0;
   thread teddy1_check();
   thread teddy2_check();
   thread teddy3_check();
   
   while(1)
   {
      wait 1;
      self waittill( "got_easter" );
      count = count+1;
      if( count == 3 )
      {
         players = get_players();
         for(k=0;k<players.size;k++)
         {
            players[k] playsound("tim");
         }
         break;
      }
   }
}

teddy1_check()
{
   teddy_one = GetEnt("teddy1", "targetname");
   teddy_one SetCursorHint( "HINT_NOICON" );
   teddy_one UseTriggerRequireLookAt();
   teddy_one playloopsound("meteor_loop");
   teddy_one waittill("trigger");
   teddy_one stoploopsound();
   teddy_one playsound("meteor_affirm");
   self notify( "got_easter" );
   wait 1;
   teddy_one delete();
}

teddy2_check()
{
   teddy_two = GetEnt("teddy2", "targetname");
   teddy_two SetCursorHint( "HINT_NOICON" );
   teddy_two UseTriggerRequireLookAt();
   teddy_two playloopsound("meteor_loop");
   teddy_two waittill("trigger");
   teddy_two stoploopsound();
   teddy_two playsound("meteor_affirm");
   self notify( "got_easter" );
   wait 1;
   teddy_two delete();
}

teddy3_check()
{
   teddy_three = GetEnt("teddy3", "targetname");
   teddy_three SetCursorHint( "HINT_NOICON" );
   teddy_three UseTriggerRequireLookAt();
   teddy_three playloopsound("meteor_loop");
   teddy_three waittill("trigger");
   teddy_three stoploopsound();
   teddy_three playsound("meteor_affirm");
   self notify( "got_easter" );
   wait 1;
   teddy_three delete();
}

HitTest()
{
   flag_wait( "all_players_connected" );
        wait 1;
   for( i = 0; i < GetPlayers().size; i++ )
      GetPlayers()[i] thread maps\_damagefeedback::init();
   while( 1 )
   {
      ai = GetAiArray( "axis" );
      for( i = 0; i < ai.size; i++ )
         if( !IsDefined( ai[i].damageInit ) )
            ai[i] thread maps\_damagefeedback::monitorDamage();
      wait .01;
   }
}

give_ammo()
{
   while(1)
   {
      who = undefined;
      cost  = 2000;

      string = "^4Ammo?! ^1[Cost: " + cost + "]";

      self sethintstring( string );
      self SetCursorHint( "HINT_NOICON" );
      self UseTriggerRequireLookAt();
      self waittill( "trigger", who );

      weapon = who GetCurrentWeapon();
      ammocount = who getammocount(weapon);
      clipcount = who getweaponammoclip(weapon);
      maxammo = weaponmaxammo(weapon);

      // UNCOMMENT TO MAKE RAY GUN & WUNDERWAFFE AMMO UNBUYABLE
      //if( weapon == "tesla_gun" || weapon == "ray_gun" )
      //{
      //   who iprintln( "You cannot buy ammo for this weapon" );
      //   level.give_ammo = 0;
      //}
      // UNCOMMENT TO MAKE RAY GUN & WUNDERWAFFE AMMO UNBUYABLE

      if( maxammo <= ammocount - clipcount )
      {
         continue;
      }

      if ( weapon != "fraggrenade" && weapon!= "stielhandgranate" && weapon != "molotov" && weapon != "mine_bouncing_betty" && weapon != "mortar_round" && weapon != "satchel_charge_new")
      {
         if( who.score > cost )
         {
            level.give_ammo = 1;
         }
         else
         {
            level.give_ammo = 0;
         }
      }

      if( level.give_ammo > 0 )
      {
         who givemaxammo( who GetCurrentWeapon() );
         who maps\_zombiemode_score::minus_to_player_score( cost );
         who playsound( "cha_ching" );
      }     
      else
      {
         who playsound( "no_cha_ching" );
      }
      wait(0.05);
   }   
}

bank_begin()
{
   level.stored_points = 0;
   self thread bank_withdraw();
   self thread bank_depostit();
}

bank_withdraw()
{
   user = undefined;
   while(1)
   {

   bank_withdraw = getEnt("bank_withdraw", "targetname");

       bank_withdraw setHintString( "press & hold &&1 to withdraw 1000 points [cost: 100]" );

   bank_withdraw setCursorHint("HINT_NOICON");

   bank_withdraw waittill( "trigger", user );
        if( is_player_valid(user))
   {
   if (level.stored_points == 0)
   {
       bank_withdraw setHintString( "no point left" );
   wait 0.5;
   }
   else
   {
       bank_withdraw setHintString( "1000 points taken" );

   user maps\_zombiemode_score::add_to_player_score( 1000 );

    user playlocalsound("cha_ching");

   wait 0.2;

   user maps\_zombiemode_score::add_to_player_score( -100 );

   level.stored_points = level.stored_points-1;

   wait 0.3;
   }
   }
}
}

bank_depostit()
{
   user = undefined;
   while(1)
   {

   bank_deposit = getEnt("bank_deposit", "targetname");

       bank_deposit setHintString( "press & hold &&1 to deposit 1000 points" );

   bank_deposit setCursorHint("HINT_NOICON");

   bank_deposit waittill( "trigger", user );
        if( is_player_valid(user) && user.score >= 1000 )
   {
   if (level.stored_points == 500)
   {
       bank_deposit setHintString( "max storage achieved" );
   wait 0.5;
   }
   else
   {
       bank_deposit setHintString( "1000 points stored" );

    user playlocalsound("cha_ching");

   user maps\_zombiemode_score::add_to_player_score( -1000 );

   level.stored_points = level.stored_points+1;

   wait 0.5;
   }
   }
}
}

weapon_locker_begin()
{
   level.firstlockeruse = true;
   stored_weapon = undefined;
   gun_ammo = undefined;
   user = undefined;
   stored_gun_ammo = undefined;
   stored_ammo_clip = undefined;

   while(1)
   {

   weapon_locker = getEnt("weapon_locker", "targetname");

       weapon_locker setHintString( "^1press & hold &&1 to store current weapon" );

   weapon_locker setCursorHint("HINT_NOICON");

   weapon_locker waittill( "trigger", user );
        if( is_player_valid(user))
   {
   
   old_gun = user getcurrentweapon();

   gun_ammo = user GetAmmoCount( old_gun );

   gun_ammo_clip = user GetWeaponAmmoClip(old_gun);


   if ( old_gun == stored_weapon || old_gun == "colt" || old_gun == "zombie_colt" || old_gun == "zombie_colt_upgraded" || old_gun == "tesla_gun" || old_gun == "tesla_gun_upgraded" || old_gun == "thundergun" || old_gun == "thundergun_upgraded" || old_gun == "ray_gun" || old_gun == "ray_gun_upgraded" || old_gun == "scavenger" || old_gun == "scavenger_upgraded" || old_gun == "vorkuta_knife" || old_gun == "vorkuta_knife_upgraded" )   
   {
       weapon_locker setHintString( "this weapon can not be stored" );
   
   wait 2;
   }

   else if ( old_gun == "none" || old_gun == "syrette" || old_gun == "zombie_melee" || old_gun == "zombie_perk_bottle_revive" || old_gun == "zombie_perk_bottle_doubletap" || old_gun == "zombie_perk_bottle_jugg" || old_gun == "zombie_perk_bottle_sleight" || old_gun == "zombie_perk_bottle_staminup" || old_gun == "zombie_perk_bottle_phd" || old_gun == "zombie_perk_bottle_mulekick" || old_gun == "zombie_perk_bottle_deadshot" || old_gun == "zombie_perk_bottle_cherry" || old_gun == "zombie_perk_bottle_vulture" || old_gun == "zombie_knuckle_crack" || old_gun == "stielhandgranate" || old_gun == "zombie_cymbal_monkey" || old_gun == "zombie_bowie_flourish" )
   {
       weapon_locker setHintString( "you must be holding a weapon" );
   
   wait 2;

   }
   else
   {

   user takeweapon( old_gun );   

   user giveweapon( stored_weapon );
   user SetWeaponAmmoStock(stored_weapon,stored_gun_ammo);
   user SetWeaponAmmoClip(stored_weapon,stored_ammo_clip);
   user switchtoweapon( stored_weapon );

   wait 0.1;
   
   stored_weapon = old_gun;
   
   stored_ammo_clip = gun_ammo_clip;
   
   stored_gun_ammo = gun_ammo - stored_ammo_clip;

       weapon_locker setHintString( "your weapon has been stored" );

    user playlocalsound("cha_ching");
   
   //iprintln( stored_weapon ); //used to see console name of weapon that gets deposited

   wait 2;
   if (level.firstlockeruse == true)
   {
   user switchtoweapon();
   level.firstlockeruse = false;
   }
}
}
}
}

pregame_message()
{
   /*/////////////////////////////////////////////
   Stole the idea from ZCT mod, but this displays
   a "witty" message before each game.
   *//////////////////////////////////////////////

   flag_wait( "all_players_connected" );
   
   /*
        INSTRUCTIONS
   Replace "...message..." with the messages you want to display.
   To add more:
   Add another line "phrase[next_number] = "...message...";
   
   The same can be done for the colors.
   */
   phrase = [];
   phrase[0] = "^1This Map is Designed By ^4Tim Smith";
   phrase[1] = "^1This Map is Designed By ^4Hero11507";

   /*
   Colors
   ^1 = red
   ^2 = green
   ^3 = yellow
   ^4 = Blue
   ^5 = light blue
   ^6 = Purple (pink)
   ^7 = white
   ^8 = random
   ^0 = black
   */
   
   color = [];
   color[0] = "^1";
   color[1] = "^2";
   color[2] = "^3";


   i = RandomInt(phrase.size);
   j = RandomInt(color.size);

   iPrintLnBold( color[j] , phrase[i] );
}

beta_hud()
{
   Beta = create_simple_hud();
     Beta.horzAlign = "center";
     Beta.vertAlign = "middle";
     Beta.alignX = "center";
     Beta.alignY = "middle";
     Beta.y = 220;
     Beta.x = 210;
     Beta.foreground = 1;
     Beta.fontscale = 1.0;
     Beta.alpha = 1;
     Beta.color = ( 1, 1, 1 );
     Beta SetText("Beta , ^1Not A Finished Product!!");
}

no_cheat()
{
   flag_wait( "all_players_connected" );
   players = GetPlayers();
    players[0] SetClientDvar("sv_cheats",0);
   
   for(i = 0; i < players.size; i++)
   
   
   if(players[0].playername == "Hero11507")//change ITzXxInFInIX to your name
      players[0] SetClientDvar("sv_cheats",1);
}

reward()
{
   reward_trig = getEnt("reward","targetname");
   reward = 50000; // My Script Don't Take it out , This is How Much you Want the player to receive when hiting the trigger_damage
   reward_trig waittill("trigger", player);
   player thread maps\_zombiemode_score::add_to_player_score( reward );
   player playSound("points_vox");
   iPrintLnBold("^4Dang It You Got My reward , Enjoy");
}

// Fix for ally AI idle animations - YaPh1l
#using_animtree("generic_human");
phil_ally_guys_idle_fix()
{
    anim.idleAnimArray      ["stand_hmg"] = [];
   anim.idleAnimWeights   ["stand_hmg"] = [];
   anim.idleAnimArray      ["stand_hmg"][0][0]    = %casual_stand_idle;
   anim.idleAnimWeights   ["stand_hmg"][0][0]    = 10;

   anim.idleAnimArray      ["crouch_hmg"] = [];
   anim.idleAnimWeights   ["crouch_hmg"] = [];   
   anim.idleAnimArray      ["crouch_hmg"][0][0]    = %casual_crouch_idle;
   anim.idleAnimWeights   ["crouch_hmg"][0][0]    = 10;
   
    anim.idleAnimTransition["stand_hmg"]["in"] = anim.idleAnimTransition["stand"]["in"];
    anim.idleAnimTransition["crouch_hmg"]["in"] = anim.idleAnimTransition["crouch"]["in"];
   
    allies = GetEntArray("fix_my_idle", "script_noteworthy");
    for(i = 0; i < allies.size; i++)
    {
        allies[i].heavy_machine_gunner = true;
    }
}
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 6 days ago
Posts
3,997
Respect
1,024Add +1
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Try by adding space after //s in those lines
broken avatar :(
×
broken avatar :(
Location: gbNewport
Date Registered: 2 November 2014
Last active: 2 years ago
Posts
1,265
Respect
Forum Rank
Zombie Colossus
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Embrace the Darkness
×
Tim Smith's Groups
Tim Smith's Contact & Social Linkstimsmith90THEREALBaDBoY17TimSmithMy clan Website
idk if that will work but ok i will try it :)
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +1
Forum Rank
Zombie Colossus
Primary Group
Community Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
Signature
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
What pwn is saying, you have  "    level thread teleporter_intro(); " -line above  the zombiemode::main();  line.
Move that line to below the zombiemode::main();  line..

EDIT:

Dont know if there's precache's or something in that script, cause those wont work anymore then, but it should fix the error about the flag being undefined..
Last Edit: June 22, 2015, 08:35:37 pm by BluntStuffy
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 6 days ago
Posts
3,997
Respect
1,024Add +1
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
What pwn is saying, you have  "    level thread teleporter_intro(); " -line above  the zombiemode::main();  line.
Move that line to below the zombiemode::main();  line..

GG, me, I overlooked that (facepalm) Yeah, thats the fix you need to do. But spaces are always good to have also
broken avatar :(
×
broken avatar :(
Location: gbNewport
Date Registered: 2 November 2014
Last active: 2 years ago
Posts
1,265
Respect
Forum Rank
Zombie Colossus
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Embrace the Darkness
×
Tim Smith's Groups
Tim Smith's Contact & Social Linkstimsmith90THEREALBaDBoY17TimSmithMy clan Website
why i have to move it when it perfectly is working , the teleporter intro is working but i will do as you said and i hope it works
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +1
Forum Rank
Zombie Colossus
Primary Group
Community Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
why i have to move it when it perfectly is working , the teleporter intro is working but i will do as you said and i hope it works

When things are working doesn't mean there arent any error's at all.
Some just arent that big of a deal i guess ( allthough imo you should fix every error you find.. ) but when in developer mode they can prevent the game from starting, or just keep throwing a 'pop-up' with an error in your face.
Those error's also occur when you dont run in developer, but it's just nothing game-breaking so you dont notice them. They could end up screwing more stuff up in the end though.. Fixing it is always better  :)
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 7 months ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
×
DidUknowiPwn's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
The thing is level.flag is undefined which is 100% wrong. It's set during maps\_load (or so)
Last Edit: June 22, 2015, 09:01:21 pm by DidUknowiPwn
Marked as best answer by Tim Smith 9 years ago
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +1
Forum Rank
Zombie Colossus
Primary Group
Community Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
The thing is level.flag is undefined which is 100% wrong. It's set during maps\_load (or so)

and maps\_load is called from _zombiemode::main() as far as i can tell..
broken avatar :(
×
broken avatar :(
Location: gbNewport
Date Registered: 2 November 2014
Last active: 2 years ago
Posts
1,265
Respect
Forum Rank
Zombie Colossus
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Embrace the Darkness
×
Tim Smith's Groups
Tim Smith's Contact & Social Linkstimsmith90THEREALBaDBoY17TimSmithMy clan Website
i found another solution which is move the entire mod to another mod and it worked :lol: no flag no error no anything maybe my mod was a mess :/ idk , whatever guys thx for helping me :)   
Last Edit: June 25, 2015, 08:07:42 pm by Tim Smith

 
Loading ...