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

Custom weapon error messages

Recommended Posts

So I decided to have a go at coding my own custom weapon from scratch rather than just copy/pasting other peoples code. I get 2 errors though. The first problem is that gzdoom builder complains about missing sprites even though I put them into the sprites folder and I don't understand why. The second problem is that when gzdoom runs it complains about weapon selection order being an unknown property which is odd since the zdoom wiki says it's a real one.

 

Screenshots in spoiled below. What is causing the errors?

 

Spoiler

mvDHHfp.png

 

y7O003t.png

 

OxWyGHe.png

 

 

 

 

Share this post


Link to post

Your weapon doesn't inherit from the weapon actor itself. You need to do: "Actor testgun : Weapon 11004"

Otherwise your code seems fine.

Share this post


Link to post
1 hour ago, -TDRR- said:

Your weapon doesn't inherit from the weapon actor itself. You need to do: "Actor testgun : Weapon 11004"

Otherwise your code seems fine.

 

Tried that and I just got this error:

 

"DECORATE warning in "simpleweapon.pk3\decorate", line 35. Unable to find "Weapon" class to inherit from, while parsing "testgun:11004"."

Share this post


Link to post
24 minutes ago, hardcore_gamer said:

 

Tried that and I just got this error:

 

"DECORATE warning in "simpleweapon.pk3\decorate", line 35. Unable to find "Weapon" class to inherit from, while parsing "testgun:11004"."

 

Send me the PK3 file, i really don't know what is going on with that weapon.

EDIT: Your version of GZDoom is outdated, update to the latest one just in case.

Share this post


Link to post

Two issues I can see right away... as said you need to at least inherit from Weapon base class. Secondly, you are missing Loop on Select and Deselect.

Share this post


Link to post
4 minutes ago, Nevander said:

Two issues I can see right away... as said you need to at least inherit from Weapon base class. Secondly, you are missing Loop on Select and Deselect.

 

50 minutes ago, -TDRR- said:

 

Send me the PK3 file, i really don't know what is going on with that weapon.

EDIT: Your version of GZDoom is outdated, update to the latest one just in case.

 

I am using gzdoom 3.6 I think and I still get these errors.

 

I added the loop to select and deselect and I still get errors. I have uploaded the pk3

 

 

 

 

simpleweapon.zip

Share this post


Link to post

Your GZDoom installation must be busted, works perfectly fine in my GZDoom 1.8.6 install.

One thing though, it's not FIR2AO, it's a zero, so it would be FIR2A0. That is why GZDoom Builder had those errors.

Share this post


Link to post
14 hours ago, -TDRR- said:

Your GZDoom installation must be busted, works perfectly fine in my GZDoom 1.8.6 install.

One thing though, it's not FIR2AO, it's a zero, so it would be FIR2A0. That is why GZDoom Builder had those errors.

 

I changed the O's to 0's and now at least I don't get the sprite error. But I still get the "DECORATE warning in "simpleweapon.pk3\decorate", line 37. Unable to find "Weapon" class to inherit from, while parsing "testgun:11004"." error which can't have anything to do with gzdoom because this happens inside of Gzdoom builder rather than gzdoom of which I am using a very recent version.

 

 

Share this post


Link to post
30 minutes ago, hardcore_gamer said:

 

I changed the O's to 0's and now at least I don't get the sprite error. But I still get the "DECORATE warning in "simpleweapon.pk3\decorate", line 37. Unable to find "Weapon" class to inherit from, while parsing "testgun:11004"." error which can't have anything to do with gzdoom because this happens inside of Gzdoom builder rather than gzdoom of which I am using a very recent version.

 


You just ignore that, it won't affect mapping at all.

Share this post


Link to post
7 minutes ago, -TDRR- said:


You just ignore that, it won't affect mapping at all.

 

Yea it does. It won't even run and I am using gzdoom 3.60 which I believe is the latest version. I just get this error:

Execution could not continue.

Script error, "simpleweapon.pk3:decorate" line 6:
'@property@weapon.selectionorder' is an unknown actor property

 

After changing the O's to 0's I did get rid of the sprite errors as I said, but for some reason both Gzdoom builder as well as Gzdoom complain about unknown classes and properties.

 

EDIT: Never mind I deleted the : weapon from the decorate code by mistake. I still have some other problems that are unrelated but I think I can fix those unless I state otherwise.

 

EDIT 2: For some reason nothing happens when I press the fire button and I can't change weapons after I pick up the gun.

Share this post


Link to post
31 minutes ago, hardcore_gamer said:

 

Yea it does. It won't even run and I am using gzdoom 3.60 which I believe is the latest version. I just get this error:

Execution could not continue.

Script error, "simpleweapon.pk3:decorate" line 6:
'@property@weapon.selectionorder' is an unknown actor property

 

After changing the O's to 0's I did get rid of the sprite errors as I said, but for some reason both Gzdoom builder as well as Gzdoom complain about unknown classes and properties.

Make sure you are doing "testgun : weapon" and reinstall GZDoom, because it's running fine on my PC.

Share this post


Link to post
13 minutes ago, -TDRR- said:

Make sure you are doing "testgun : weapon" and reinstall GZDoom, because it's running fine on my PC.

 

I still get the error and the weapon doesn't fire in-game or let me switch weapons. What version of Gzdoom are you using?

Share this post


Link to post
1 minute ago, -TDRR- said:

Tested in 1.8.6 and 3.6.0.

You forgot the A_WeaponReady codepointer in the Ready state.

 

And now my computer explod.....just kidding it worked now!

 

I love it how sometimes it's just little things like these that can break everything.......

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
×