GZDoom spitting out errors for seemingly no reason

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
User avatar
orangeninja27
Posts: 9
Joined: Wed Mar 21, 2018 2:42 pm

GZDoom spitting out errors for seemingly no reason

Post by orangeninja27 »

This is probably due to some weird formatting error or something, but here goes!

I was attempting to make a replacement for the chainsaw that would alert monsters as soon as it is selected, as well as during its ready state. To achieve this effect without screwing up the animations or anything, I added the following line to the beginning of both the ready and select states:

Code: Select all

TNT1 A 0 A_AlertMonsters 512
Whenever I boot up DOOM it spits out the following error:

Code: Select all

Script error, "wicked_doom_assets.wad:DECORATE" line 468:
Sprite names must be exactly 4 characters
I have no idea why it's doing this. I've tried looking up the error online and seeing what was causing it for other people, but none of these problems apply to my code as far as I can tell. In fact, until I added this line, the code worked perfectly.

Here's a link to my WAD thus far:
https://www.dropbox.com/s/cj4g67bxfuh7p ... assets.wad
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed

Re: GZDoom spitting out errors for seemingly no reason

Post by wildweasel »

The problem is how you're specifying your arguments for A_AlertMonsters. The interpreter assumes that a space after an action function is a new-line, so it wants the next string to be a string of 4 characters to reference a sprite, and is instead getting "512."

What you should be doing is using parentheses to supply an argument to a function, like this:

Code: Select all

TNT1 A 0 A_AlertMonsters(512)
User avatar
orangeninja27
Posts: 9
Joined: Wed Mar 21, 2018 2:42 pm

Re: GZDoom spitting out errors for seemingly no reason

Post by orangeninja27 »

Of course. I forgot all about that. Thanks!

By the way, your tutorials on Gunlabs were what got me into making my own DOOM mods. I still use them today, actually.

Return to “Scripting”