ENIGMA Forums

Outsourcing saves money => Issues Help Desk => Topic started by: ojars on August 27, 2019, 03:31:21 pm

Title: Error Unknown function or script `audio_play_sound'
Post by: ojars on August 27, 2019, 03:31:21 pm
Hi all, I got an error Unknown function or script `audio_play_sound' in my game. After that I created new game with only create event and that function and another .wav file and got the same error.
Quote
Event[0, 0] Check `o_game::create...Syntax error in object `o_game', Create event:0:
Line 1, position 18 (absolute 17): Unknown function or script `audio_play_sound'

In the Game settings Platform is Windows, Graphics was set to Direct3D 11.0 and Audio to DirectSound. After the error I switched Gaphics to OpenGL 3.3 and Audio to OpenAl, and got another error
Quote
D:/Programmas/MSYS2/mingw32/bin/../lib/gcc/i686-w64-mingw32/7.4.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lmodplug
collect2.exe: error: ld returned 1 exit status
make[1]: *** [Makefile:139: compile_game] Error 1
make[1]: Leaving directory '/d/Programmas/ENIGMA/enigma-dev/ENIGMAsystem/SHELL'
make: *** [Makefile:20: Game] Error 2
Where is my mistake?
Title: Re: Error Unknown function or script `audio_play_sound'
Post by: time-killer-games on August 29, 2019, 08:27:19 am
You need to use OpenAL instead of DirectSound for this.

https://enigma-dev.org/forums/index.php?topic=3006.0

Install instructions can be found there, which will fix the error.
Title: Re: Error Unknown function or script `audio_play_sound'
Post by: ojars on August 29, 2019, 10:55:16 am
Thank you, this works.