Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
DoomF4nG4mer

Script Error

Recommended Posts

I was just messing around with some scripts of the Ammo of the Guns and the PsychoPhobia Random Ammo Spawner Override and all of a sudden i got this error:


I got confused when i was checking the script when this error happened i mean "'M79Ammo'not found in x_Rocket?" What the Hell! The M79Ammo was in the Decorate Script as always!


Look here it is.


And here is the Script that is causing the problem.

Share this post


Link to post

That's not the only problem here. I copy/pasted the code here, and it atleast launched in GZDoom. However, when summoning M79Ammo or x_Rocket, it locks up. I believe it's because you have x_Rocket calling A_Fall, so it drops M79Ammo (Which is actually replaced by x_Rocket anyways, so that part is redundant), which then all those x_Rockets dropping more x_Rockets...

As far as I understand it, GZDoom gets stuck in a loop and doesn't give the system a chance to do anything else, the same reason runaway scripts get terminated automatically. There just doesn't seem to be any checking for DECORATE loops. You're gonna need to rework this a little to make it work right.

Share this post


Link to post

It'll be ugly, but you don't have to. If you create new ammo classes based on (but not derived from) the M79Ammo class, make whatever applicable guns use them, then have the X_Rocket classes spawn them instead, it should all work. In theory.

Share this post


Link to post

the only thing I can suggest is trying to change the loading order of your wads. I don't know what purpouse A_Fall is serving, I could have done without. And make sure "dropitem" works on ammo actors because i'm not so sure if it does.

Share this post


Link to post

The thing that puzzles me is why you replace RocketAmmo by M79Ammo, and then M79Ammo by x_Rocket, instead of replacing RocketAmmo by x_Rocket and having M79Ammo not replace anything.

Further, consider this, if your mod were to work:
1. There is a rocket ammo on the map.
2. It is replaced by a M79 ammo which is replaced by an x_Rocket.
3. The x_Rocket spawns three M79 ammo, which are all replaced by x_Rockets.
4. The three x_Rockets spawn nine more x_Rockets.
5. Now you've got 27 x_Rockets.
6. Woops! 81.
7. 243! Will it ever stop?
8. 729. No, it won't.
And so on. A full second after the map has started (35 tics), you get 3^35, or 50 031 545 098 999 707 x_Rockets.

Bishop said:

the only thing I can suggest is trying to change the loading order of your wads. I don't know what purpouse A_Fall is serving, I could have done without. And make sure "dropitem" works on ammo actors because i'm not so sure if it does.

You're answering your own question: A_Fall's purpose is to spawn the DropItems.

Share this post


Link to post

Referring back to the problem script in your original post - are there sprite frames for NULL A?

Share this post


Link to post

The x_Rocket and x_RocketBox actors both have this spawn state...

	Spawn:
		NULL A 0 
		NULL A 1 A_Fall 
		Stop
Am I missing something obvious or are there no sprite frames for NULL?

Share this post


Link to post

If you want not to use sprites, there is a reserved keyword name for invisible frames. It's TNT1, not NULL. NULL would have been a more logical and intuitive choice, I agree, but you can blame the Boom developers if it is TNT1 instead.

Share this post


Link to post
Gez said:

If you want not to use sprites, there is a reserved keyword name for invisible frames. It's TNT1, not NULL. NULL would have been a more logical and intuitive choice, I agree, but you can blame the Boom developers if it is TNT1 instead.

In EDF the keyword 'blank' is accepted to stand for this as well, since it cannot alias a valid sprite name. The sprite considered the 'blank' sprite is even definable in EDF itself, with the blanksprite global variable (its default value is "TNT1"). DECORATE could do something similar if it wanted, though that wouldn't help anybody who just assumes things without reading the documentation first, as I assume is happening here...

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
×