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

[UDB and SLADE] SNDINFO, "Identifier has not been declared."

Recommended Posts

I'm having trouble compiling a script that plays a custom sound:

image.png.99d8cf98ddd78cde4851e96e33aa2795.png

You can see the error in the screenshot:

Quote

1 | pa : Identifier has not been declared. | SCRIPTS (line 6)

Normally this is because I didn't put a SNDINFO.txt in the WAD file. What's confusing me is the fact it still gives me this error despite the fact I did, as well as fill it out properly (supposedly). I tried both old and new syntax. Below are the entire contents of SNDINFO, and partial contents of the WAD:

image.png.2063b19d37eb93e89adf86fc2225f05a.png

image.png.5fbf3382057cab0bd536823e6521995d.png

 

I've tried:

  • different name schemes
  • different ordering of lumps
  • backslash/forwardslash
  • restarting SLADE, UDB, my whole PC

 

What I haven't tried:

  • Magic spells
  • Power cycling my house
  • Cocaine

 

What can I do?

Share this post


Link to post

Just type "PALOBO PALOBO" (without quotation marks, silly boy) in SNDINFO then just write PALOBO in place of pa/lobo, man !! NEXT.

Share this post


Link to post
1 hour ago, Pokeblue said:

You can see the error in the screenshot:

Quote

1 | pa : Identifier has not been declared. | SCRIPTS (line 6)

Normally this is because I didn't put a SNDINFO.txt in the WAD file.

Nah, this error is not because of SNDINFO. It's happening because you are trying to use a string argument without quotes, so the compiler gets confused, and thinks that you are trying to do a math division of 'pa' by 'lobo'. Also you are using the wrong ACS function for playing a custom sound.
Try this instead:

 PlaySound (8, "pa/lobo", CHAN_VOICE, 1.0, FALSE, ATTN_NONE);

For full volume, you also need to use 1.0 instead of 1. Because the argument is a fixed point number.

 

Btw. in your SNDINFO lump, you should not include to the filetype extension ".wav".

Share this post


Link to post
7 hours ago, Worst said:

you are trying to do a math division of 'pa' by 'lobo'.

Thank you, this is what did it. What's strange is that I've tried naming the sound after its lump so that it wouldn't have any special characters in it (just like Duderald's solution), but it still complained. Do I need the quotes regardless?

 

7 hours ago, Worst said:

Also you are using the wrong ACS function for playing a custom sound.

Thanks for this, as well. From my first glance of the documentation, it seemed like exactly what I wanted in order to play sound from a specific actor. Just reread the docs, and no, it wasn't what I wanted. Thanks again.

 

7 hours ago, Worst said:

Btw. in your SNDINFO lump, you should not include to the filetype extension ".wav".

It was one of the things I tried that I neglected to mention. I've seen other people try it when there's multiple sound files with the same name but different extensions. Obviously, it didn't help me in this case. Removing it was actually the solution to my second problem: the fact it wasn't playing in game despite the script compiling.

 

You've been a really big help, please go buy yourself something nice.ALLSWELLTHATENDSWITHHEAVY.png.01036cdb4fe8ccc448cf8abd5331369c.png

 

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
×