LoadModule() is not a function, array, list, map or macro.
Posted: Tue Dec 17, 2024 2:59 pm
I'm trying to run this example code
from https://www.purebasic.com/documentation ... le.pb.html
However it fails to compile:
[14:53:08] Waiting for executable to start...
[13:53:08] Executable type: MacOSX - arm64 (64bit, Unicode)
[13:53:08] Executable started.
[14:53:14] The Program execution has finished.
[14:55:50] [COMPILER] Line 8: LoadModule() is not a function, array, list, map or macro.
I'm running PureBasic 6.12 LTS - C Backend (arm64) on Mac.
According to the docs https://www.purebasic.com/documentation ... index.html LoadModule() is valid. Any ideas?
Code: Select all
If InitSound() = 0
MessageRequester("Error", "Sound system not available.") : End
EndIf
FileName$ = OpenFileRequester("","","Modules (*.mod, *.xm, *.it)|*.mod;*.xm", 0)
If FileName$
If LoadModule(0, FileName$)
PlayModule(0)
MessageRequester("PureBasic - Module player", "Playing the module...")
; Now, perform a nice fading...
;
For k=100 To 0 Step -1
Delay(20)
ModuleVolume(0, k)
Next
Else
MessageRequester("Error", "Can't load the module or bad module format.")
EndIf
EndIf
However it fails to compile:
[14:53:08] Waiting for executable to start...
[13:53:08] Executable type: MacOSX - arm64 (64bit, Unicode)
[13:53:08] Executable started.
[14:53:14] The Program execution has finished.
[14:55:50] [COMPILER] Line 8: LoadModule() is not a function, array, list, map or macro.
I'm running PureBasic 6.12 LTS - C Backend (arm64) on Mac.
According to the docs https://www.purebasic.com/documentation ... index.html LoadModule() is valid. Any ideas?