Pokeblue Posted November 28, 2023 I'm having trouble compiling a script that plays a custom sound: 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: 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? 0 Share this post Link to post
Duderald Posted November 28, 2023 Just type "PALOBO PALOBO" (without quotation marks, silly boy) in SNDINFO then just write PALOBO in place of pa/lobo, man !! NEXT. 0 Share this post Link to post
Worst Posted November 28, 2023 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". 2 Share this post Link to post
Pokeblue Posted November 28, 2023 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. 1 Share this post Link to post