Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. Trying to host zombies server for friends

Trying to host zombies server for friends

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
9 Posts 4 Posters 603 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • MedicalMedsundefined Offline
    MedicalMedsundefined Offline
    MedicalMeds
    wrote on last edited by
    #1

    So I'm trying to host a zombies server for my friends and I on the map Town. The server works but I found out that on Town and other Tranzit maps tombstone doesn't spawn in. There's a script that I've been trying to use to spawn in tombstone but I get an error code that looks like this when I run the batch file:
    **** 5 script error(s):
    **** Unresolved external : "array_thread" with 3 parameters in "tombstone" at lines 1,1 ****
    **** Too many parameters: "vibrate" with 6 parameters in "tombstone"
    **** Unresolved external : "array_thread" with 2 parameters in "tombstone" at lines 1,1,1 *
    After I get this error the server sends a heartbeat and the heartbeat is successful. When I then try to join it says awaiting connection for around 15 second before it says that I timed out.
    Here's the code I copied:

    #include maps\mp\zombies\_zm_perks;
    
    init()
    {
    	isTown();
    }
    
    solo_tombstone_removal()
    {
    	notify( "tombstone_on" );
    }
    
    turn_tombstone_on()
    {
    	while ( 1 )
    	{
    		machine = getentarray( "vending_tombstone", "targetname" );
    		machine_triggers = getentarray( "vending_tombstone", "target" );
    		i = 0;
    		while ( i < machine.size )
    		{
    			machine[ i ] setmodel( level.machine_assets[ "tombstone" ].off_model );
    			i++;
    		}
    		level thread do_initial_power_off_callback( machine, "tombstone" );
    		array_thread( machine_triggers, ::set_power_on, 0 );
    		level waittill( "tombstone_on" );
    		i = 0;
    		while ( i < machine.size )
    		{
    			machine[ i ] setmodel( level.machine_assets[ "tombstone" ].on_model );
    			machine[ i ] vibrate( vectorScale( ( 0, -1, 0 ), 100 ), 0,3, 0,4, 3 );
    			machine[ i ] playsound( "zmb_perks_power_on" );
    			machine[ i ] thread perk_fx( "tombstone_light" );
    			machine[ i ] thread play_loop_on_machine();
    			i++;
    		}
    		level notify( "specialty_scavenger_power_on" );
    		array_thread( machine_triggers, ::set_power_on, 1 );
    		if ( isDefined( level.machine_assets[ "tombstone" ].power_on_callback ) )
    		{
    			array_thread( machine, level.machine_assets[ "tombstone" ].power_on_callback );
    		}
    		level waittill( "tombstone_off" );
    		if ( isDefined( level.machine_assets[ "tombstone" ].power_off_callback ) )
    		{
    			array_thread( machine, level.machine_assets[ "tombstone" ].power_off_callback );
    		}
    		array_thread( machine, ::turn_perk_off );
    		players = get_players();
    		_a1718 = players;
    		_k1718 = getFirstArrayKey( _a1718 );
    		while ( isDefined( _k1718 ) )
    		{
    			player = _a1718[ _k1718 ];
    			player.hasperkspecialtytombstone = undefined;
    			_k1718 = getNextArrayKey( _a1718, _k1718 );
    		}
    	}
    }
    
    perk_machine_spawn_init()
    {
    	match_string = "";
    	location = level.scr_zm_map_start_location;
    	if ( location != "default" && location == "" && isDefined( level.default_start_location ) )
    	{
    		location = level.default_start_location;
    	}
    	match_string = ( level.scr_zm_ui_gametype + "_perks_" ) + location;
    	pos = [];
    	if ( isDefined( level.override_perk_targetname ) )
    	{
    		structs = getstructarray( level.override_perk_targetname, "targetname" );
    	}
    	else
    	{
    		structs = getstructarray( "zm_perk_machine", "targetname" );
    	}
    	_a3578 = structs;
    	_k3578 = getFirstArrayKey( _a3578 );
    	while ( isDefined( _k3578 ) )
    	{
    		struct = _a3578[ _k3578 ];
    		if ( isDefined( struct.script_string ) )
    		{
    			tokens = strtok( struct.script_string, " " );
    			_a3583 = tokens;
    			_k3583 = getFirstArrayKey( _a3583 );
    			while ( isDefined( _k3583 ) )
    			{
    				token = _a3583[ _k3583 ];
    				if ( token == match_string )
    				{
    					pos[ pos.size ] = struct;
    				}
    				_k3583 = getNextArrayKey( _a3583, _k3583 );
    			}
    		}
    		else pos[ pos.size ] = struct;
    		_k3578 = getNextArrayKey( _a3578, _k3578 );
    	}
    	if ( !isDefined( pos ) || pos.size == 0 )
    	{
    		return;
    	}
    	precachemodel( "zm_collision_perks1" );
    	i = 0;
    	while ( i < pos.size )
    	{
    		perk = pos[ i ].script_noteworthy;
    		if ( isDefined( perk ) && isDefined( pos[ i ].model ) )
    		{
    			use_trigger = spawn( "trigger_radius_use", pos[ i ].origin + vectorScale( ( 0, -1, 0 ), 30 ), 0, 40, 70 );
    			use_trigger.targetname = "zombie_vending";
    			use_trigger.script_noteworthy = perk;
    			use_trigger triggerignoreteam();
    			perk_machine = spawn( "script_model", pos[ i ].origin );
    			perk_machine.angles = pos[ i ].angles;
    			perk_machine setmodel( pos[ i ].model );
    			if ( isDefined( level._no_vending_machine_bump_trigs ) && level._no_vending_machine_bump_trigs )
    			{
    				bump_trigger = undefined;
    			}
    			else
    			{
    				bump_trigger = spawn( "trigger_radius", pos[ i ].origin, 0, 35, 64 );
    				bump_trigger.script_activated = 1;
    				bump_trigger.script_sound = "zmb_perks_bump_bottle";
    				bump_trigger.targetname = "audio_bump_trigger";
    				if ( perk != "specialty_weapupgrade" )
    				{
    					bump_trigger thread thread_bump_trigger();
    				}
    			}
    			collision = spawn( "script_model", pos[ i ].origin, 1 );
    			collision.angles = pos[ i ].angles;
    			collision setmodel( "zm_collision_perks1" );
    			collision.script_noteworthy = "clip";
    			collision disconnectpaths();
    			use_trigger.clip = collision;
    			use_trigger.machine = perk_machine;
    			use_trigger.bump = bump_trigger;
    			if ( isDefined( pos[ i ].blocker_model ) )
    			{
    				use_trigger.blocker_model = pos[ i ].blocker_model;
    			}
    			if ( isDefined( pos[ i ].script_int ) )
    			{
    				perk_machine.script_int = pos[ i ].script_int;
    			}
    			if ( isDefined( pos[ i ].turn_on_notify ) )
    			{
    				perk_machine.turn_on_notify = pos[ i ].turn_on_notify;
    			}
    			if ( perk == "specialty_scavenger" || perk == "specialty_scavenger_upgrade" )
    			{
    				use_trigger.script_sound = "mus_perks_tombstone_jingle";
    				use_trigger.script_string = "tombstone_perk";
    				use_trigger.script_label = "mus_perks_tombstone_sting";
    				use_trigger.target = "vending_tombstone";
    				perk_machine.script_string = "tombstone_perk";
    				perk_machine.targetname = "vending_tombstone";
    				if ( isDefined( bump_trigger ) )
    				{
    					bump_trigger.script_string = "tombstone_perk";
    				}
    			}
    			if ( isDefined( level._custom_perks[ perk ] ) && isDefined( level._custom_perks[ perk ].perk_machine_set_kvps ) )
    			{
    				[[ level._custom_perks[ perk ].perk_machine_set_kvps ]]( use_trigger, perk_machine, bump_trigger, collision );
    			}
    		}
    		i++;
    	}
    }
    
    isTown()
    {
    	if (isDefined(level.zombiemode_using_tombstone_perk) && level.zombiemode_using_tombstone_perk)
    	{
    		level thread perk_machine_spawn_init();
    		thread solo_tombstone_removal();
    		thread turn_tombstone_on();
    	}
    }
    

    Any help would be appreciated!

    1 Reply Last reply
    0
    • Resxtundefined Offline
      Resxtundefined Offline
      Resxt
      Plutonium Staff
      wrote on last edited by
      #2

      I moved your topic to modding support since it has nothing to do with your server. If you have scripts that crash the game/server crashes becauses it fails to load everything correctly that's completely normal. It's only a script issue.

      Where did you download this script from?
      It says it fails to find two external functions so maybe you're missing an include or a file or something

      MedicalMedsundefined 1 Reply Last reply
      0
      • Resxtundefined Resxt

        I moved your topic to modding support since it has nothing to do with your server. If you have scripts that crash the game/server crashes becauses it fails to load everything correctly that's completely normal. It's only a script issue.

        Where did you download this script from?
        It says it fails to find two external functions so maybe you're missing an include or a file or something

        MedicalMedsundefined Offline
        MedicalMedsundefined Offline
        MedicalMeds
        wrote on last edited by
        #3

        Resxt I got the script from this forum: https://forum.plutonium.pw/topic/124/resource-gsc-working-tombstone-fix-works-on-tranzit-and-town
        I don't really know how to code so I might have done something wrong.

        Resxtundefined 1 Reply Last reply
        0
        • MedicalMedsundefined MedicalMeds

          Resxt I got the script from this forum: https://forum.plutonium.pw/topic/124/resource-gsc-working-tombstone-fix-works-on-tranzit-and-town
          I don't really know how to code so I might have done something wrong.

          Resxtundefined Offline
          Resxtundefined Offline
          Resxt
          Plutonium Staff
          wrote on last edited by
          #4

          MedicalMeds your code looks correct, my guess is just that you're looking at a 2020 topic and that things have changed since then

          MedicalMedsundefined 1 Reply Last reply
          0
          • Resxtundefined Resxt

            MedicalMeds your code looks correct, my guess is just that you're looking at a 2020 topic and that things have changed since then

            MedicalMedsundefined Offline
            MedicalMedsundefined Offline
            MedicalMeds
            wrote on last edited by
            #5

            Resxt Ah okay is there a way for me to figure out what's wrong and fix it?

            JezuzLizardundefined 1 Reply Last reply
            0
            • Resxtundefined Offline
              Resxtundefined Offline
              Resxt
              Plutonium Staff
              wrote on last edited by
              #6

              I don't know

              1 Reply Last reply
              0
              • MedicalMedsundefined MedicalMeds

                Resxt Ah okay is there a way for me to figure out what's wrong and fix it?

                JezuzLizardundefined Offline
                JezuzLizardundefined Offline
                JezuzLizard
                Plutonium Staff
                wrote on last edited by
                #7

                MedicalMeds Unresolved external means the function can't be found to execute. Usually this means you are missing includes.

                MedicalMedsundefined 1 Reply Last reply
                0
                • JezuzLizardundefined JezuzLizard

                  MedicalMeds Unresolved external means the function can't be found to execute. Usually this means you are missing includes.

                  MedicalMedsundefined Offline
                  MedicalMedsundefined Offline
                  MedicalMeds
                  wrote on last edited by
                  #8

                  JezuzLizard Oh okay, I don't know much about this stuff so what is an include?

                  1 Reply Last reply
                  0
                  • AguZzFWundefined Offline
                    AguZzFWundefined Offline
                    AguZzFW
                    wrote on last edited by
                    #9

                    Any updates to this? I'm in the same situation...

                    1 Reply Last reply
                    0

                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                    With your input, this post could be even better 💗

                    Register Login
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Donate