Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
shinobi.cl

Question about script that crashes the server in a Doom multiplayer game

Recommended Posts

Hi!

I have a map with this script

#include "zcommon.acs"

script 1 OPEN {
	GiveInventory("RadSuit", 1);
	Sector_SetGravity(77, 1, 0);
	SetGravity(0);
}


script 4 RESPAWN {
	GiveInventory("RadSuit", 1);
	GiveInventory("RocketAmmo", 50);
}

script 100 OPEN {
//These are the texture angles
	//Angles: 0 to 359
	int fa;
	int ca;
	//Rotate the sector
	sector_setrotation (255, fa, ca);
	//Inc the angle amount
	fa = fa + 1;
	ca = ca + 1;
	//Wrap around the angles
	if (fa > 359) {
		fa = 0;
		ca = 0;
		//TakeInventory("RadSuit", 1);
		delay(1);
		GiveInventory("RadSuit", 1);
	}
	//Slight delay here
	delay(1);
	//Do it all again
	restart;
}
The idea is that every time a player respawns, he gets a RadSuit. Also, a radsuit is given also each 10 secs aprox . For that i use a script i have that rotates a floor.

The problem is that, in Skulltag and ZDaemon, this script makes the SERVER crash..

When?

Well, in a map change (for example, from the previous map to the map in question), and at the end of the match. But that happens SOMETIMES!

Specially with many players.

Well, thats all.. can you spot the problem? Because i can't.

Share this post


Link to post

I don't see anything particularly wrong but try changing script 100 to this:

script 100 OPEN {
        while(1)
        {
//These are the texture angles
	//Angles: 0 to 359
	int fa;
	int ca;
	//Rotate the sector
	sector_setrotation (255, fa, ca);
	//Inc the angle amount
	fa += 1;
	ca += 1;
	//Wrap around the angles
	if (fa > 359) {
		fa = 0;
		ca = 0;
		//TakeInventory("RadSuit", 1);
		delay(1);
		GiveInventory("RadSuit", 1);
	}
	//Slight delay here
	delay(1);
	//Do it all again
        }
}

Share this post


Link to post

Sounds like a problem with the zdoom engine and not an error in the script. Try changing it as was suggested and see if that doesn't serve as a workaround.

Share this post


Link to post
InsanityBringer said:

You can't run wads with doom1.wad...


In fact, you can, with the right source port.


The thing that causes the crash is that the player is given a radsuit in a loop.. If i take the GiveInventory("1", "RadSuit") the thing does not crash anymore.

So, the solution would be that the player is given only 1 radsuit for each life. (At respawn time)

The problem now becomes the duration of the Radsuit... I started another thread for that...

Share this post


Link to post
shinobi.cl said:

In fact, you can, with the right source port.


The thing that causes the crash is that the player is given a radsuit in a loop.. If i take the GiveInventory("1", "RadSuit") the thing does not crash anymore.

So, the solution would be that the player is given only 1 radsuit for each life. (At respawn time)

The problem now becomes the duration of the Radsuit... I started another thread for that...


You should report that. It is agaisnt the DOOM EULA

Share this post


Link to post

Yeah, regardless of whether some engine might let you load PWADs with the shareware, one shouldn't be uploading wads that are for the shareware because it's always been id's request not to do so (which is indeed noted in the newer EULAs, even).

Share this post


Link to post

In fact, is not prohibited... is just ´rude´

Anyway, thanks for pointing that out.

What i knew, from the years when doom was a new game, is that id requested that the tool developers (read DMAUD, DEU, and such) didn´t make shareware enabled versions. You simply were not able to develop anything with the shareware wad.

But that was many years ago..

Now, when i started mapping again, and i saw that the tools let me do shareware stuff.. i though that would be a challenge trying to develop something good, even with all the limitations of the shareware wad. But that was all.... more like a challenge.

Now, i´ve just downloaded doom19s.zip just to see the readme. I think that from now on i´ll take in count the request made in that readme, <b>even when I think that making shareware modifications does the opposite that they think</b>, and instead encourages people to buy.

I'm making no more shareware wads from now on.

Share this post


Link to post

Yeah I can't speak for other ports but EE has kept the shareware checks intact, and I have expanded them to new features as well (example: shareware gamemodes disable the addfile console command, the entire dynamic wad loading menu, and the "wad" command in GFS scripts).

Share this post


Link to post

About the original script.

		//TakeInventory("RadSuit", 1);
		delay(35 * 120);
		GiveInventory("RadSuit", 1);
Remove that from script 100 and put it into its own ENTER script.

I also edited the delay

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×