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

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. gsc causing the server to suddenly crash

gsc causing the server to suddenly crash

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
11 Posts 4 Posters 444 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Sorexundefined Offline
    Sorexundefined Offline
    Sorex Contributor
    wrote on last edited by
    #2

    broken168 said in gsc causing the server to suddenly crash:

    When server crash wich error you see? You see connection interupted? you get kicked with no messages? you get overflow error?

    broken168undefined 1 Reply Last reply
    0
    • broken168undefined Offline
      broken168undefined Offline
      broken168
      replied to Sorex on last edited by broken168
      #3

      Sorex The server breaks and restarts, automatically losing the connection to the host. I get the error "Oops! Plutonium T6 ran into a problem and must be closed" in the server cmd. Two files are generated, one .txt containing the error ```

      Exception Code: 0xC0000005
      Exception Address: 0x00000006
       
      

      and the other is a 600mb dmp file that I was unable to open to try to find the error. I used the initial script (hud with kill counter, score, health) from an old server in my region, and I was adding functions, and I found a post from the owner talking about the same error, but I couldn't apply the solution he proposed ( https://forum.plutonium.pw/topic/1312/is-there-anything-in-this-gsc-file-that-explains-eventual-crashes?_=1600180398764)

      Cahzundefined 1 Reply Last reply
      0
      • Cahzundefined Offline
        Cahzundefined Offline
        Cahz VIP
        replied to broken168 on last edited by
        #4

        broken168

        healthPlayer()
        
        {
        	self endon("disconnect");
        	self.healthText = createFontString("Objective" , 2); 
                self.healthText setPoint("CENTER", "BOTTOM", "CENTER", 3.5);
               self.healthText.label = &"^2HP:  ^7";
               while(true)
                {
        		self.healthText setValue(self.health);
                wait 0.1;
             	}
        }
        

        Try replacing this function. (rewritten to use setValue instead of setText as setText can cause overflows)

        broken168undefined 1 Reply Last reply
        0
        • broken168undefined Offline
          broken168undefined Offline
          broken168
          wrote on last edited by broken168
          #5

          Did not work. The same error occurred.

          1 Reply Last reply
          0
          • broken168undefined Offline
            broken168undefined Offline
            broken168
            replied to Cahz on last edited by
            #6

            Cahz Aaa ... I simplified the code and went to try. I thought it was working, when, in round 21, the server hung up. I can't really see anything wrong with this code.

            #include maps\mp\_utility;
            #include common_scripts\utility;
            #include maps\mp\gametypes_zm\_hud_util;
            #include maps\mp\gametypes_zm\_hud_message;
            #include maps\mp\zombies\_zm_utility;
            #include maps\mp\zm_transit;
            #include maps\mp\zombies\_zm;
            #include maps\mp\zombies\_zm_stats;
            
            init()
            { 
                level.start_weapon = "fiveseven_zm";
                level.player_starting_points = 2500; 
                level.perk_purchase_limit = 9;
                level.zombie_ai_limit = 32;
                level.zombie_actor_limit = 32;
                level thread onPlayerConnect();
                level thread drawZombiesCounter();
            }
            
            onPlayerConnect()
            {
                for(;;)
                {
                    level waittill("connected", player);
                    player thread healthPlayer();
                    player thread onPlayerSpawned();
                    player thread showScore();
                    player thread setAmmo();
                    newLimit();
                }
            }
            
            onPlayerSpawned()
            {
                self endon("disconnect");
                level endon("game_ended");
            
                for(;;)
                {
                    self waittill("spawned_player", player);
                    self iprintln("MAX HEALTH DEFINED AS 150");
                    self iprintln("PERK LIMIT REMOVED");
                    wait 1;
                    self iprintln("YOU RECEIVE AMMO EVERY 20 KILLS");
                   
                }
            }
            
            healthPlayer()
            
            {
            	self endon("disconnect");
            	self.healthText = createFontString("Objective" , 2); 
                self.healthText setPoint("CENTER", "BOTTOM", "CENTER", 3.5);
                self.healthText.label = &"^2HP:  ^7";
                while(true)
                {
            		self.healthText setValue(self.health);
                    if(self.maxhealth == 100)
                    {
                    	self.maxhealth = 150;
                    }
                    wait 0.1;
                }
            }
            
            drawZombiesCounter()
            {
                level.zombiesCounter = createServerFontString("small" , 1.4);
                level.zombiesCounter setPoint("CENTER", "BOTTOM", -55, 20);
                while(true)
                {
                	enemies = get_round_enemy_array().size + level.zombie_total;
                    if( enemies != 0 )
                    	level.zombiesCounter.label = &"Zombies: ^1";
                    else
                    	level.zombiesCounter.label = &"Zombies: ^6";
                    level.zombiesCounter setValue( enemies );
                    wait 0.2;
                }
            }
            
            setAmmo()
            {
            	self.nec = 20;
            	while(true)
            	{
            		currentWeapon = self getcurrentweapon();
            		ammoAdded = weaponclipsize( currentWeapon ) + self getweaponammostock( currentWeapon );
            		if( self.nec == self.pers[ "kills" ] )
            		{
            			self setweaponammostock( currentWeapon, ammoAdded);	
            			self.nec += 20;
            		}
            		wait 0.1;
            	}
            }
            
            
            showScore()
            {
            	self.scoreShow = createFontString("small" , 1.2); //Fixed
            	self.scoreShow setPoint("CENTER", "BOTTOM", 60, 20);
            	while(true)
            	{
            		self.scoreShow.label = &"^6Score:  ^7";
            		self.scoreShow setValue(self.score);
            		wait 0.1;
            	}
            }
            
            newLimit()
            {
            	level.get_player_weapon_limit = ::new_weapon_limit;
            }
            new_weapon_limit( player )
            {
            	  return 3;
            }
            
            JezuzLizardundefined 1 Reply Last reply
            0
            • JezuzLizardundefined Offline
              JezuzLizardundefined Offline
              JezuzLizard Plutonium Staff
              replied to broken168 on last edited by
              #7

              broken168 https://drive.google.com/file/d/1kQDY_zuEuaSY2JjOPepzsxSSjfYrb_8H/view?usp=sharing Compile this script as _zm_bot.gsc and place it maps/mp/zombies. Include these dvars in your server config:

              set debugModTimescale 5
              set debugModPersonalGodMode 1
              

              Play on the server until it crashes with your mod installed. Next comment out features of your mod in order to determine what affects the stability of the server.

              broken168undefined 2 Replies Last reply
              0
              • broken168undefined Offline
                broken168undefined Offline
                broken168
                replied to JezuzLizard on last edited by
                #8

                JezuzLizard initially thank you. I did everything you said, but I can't connect to the server, I get the error "server disconnect - time out". after several attempts I was able to connect only once and was able to test, but I'm here again, trying to connect to the server and without success. the folder you shared has a .txt with other dvars, I tried to use them, but got the error "Server is full".

                JezuzLizardundefined 1 Reply Last reply
                0
                • JezuzLizardundefined Offline
                  JezuzLizardundefined Offline
                  JezuzLizard Plutonium Staff
                  replied to broken168 on last edited by
                  #9

                  broken168 I didn't say to use the other dvars from the dvars.txt. If you want to use them maybe read what each dvars name is so you what they do first. As for not being able to connect to the server with the mod loaded I don't have an answer. I use this mod all the time because it has several useful functions that I can enable with dvars making it convenient to use.

                  broken168undefined 1 Reply Last reply
                  0
                  • broken168undefined Offline
                    broken168undefined Offline
                    broken168
                    replied to JezuzLizard on last edited by
                    #10

                    JezuzLizard Really, I just tried to use it to see how it worked. I will keep trying.

                    1 Reply Last reply
                    0
                    • broken168undefined Offline
                      broken168undefined Offline
                      broken168
                      replied to JezuzLizard on last edited by
                      #11

                      JezuzLizard Hey. I managed to make it work. I changed the value of debugModTimescale to 4, maybe I was not connecting because my pc is low-end.

                      Thank you so much for your help.

                      1 Reply Last reply
                      0

                      • Login

                      • Don't have an account? Register

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