ComposerFreak/ExpAdv3

[BUG] Play Sound throws lua error

Closed this issue · 0 comments

Please see the code below, which throws the lua error shown further below.
Yes, the sound file should exist in the library. Unless the string format is wrong.

server{
    entity self = system.getEntity();
    sound.play(0, 3, "alarms/klaxon1.wav");
}
One of your Expression3 gate's has errored (see golem console).
Suffered a lua error:
    Error: addons/expadv3/lua/expression3/extensions/sound.lua:62: bad argument #1 to 'match' (string expected, got nil){
	1: Line 279	"nil"		addons/expadv3/lua/entities/wire_expression3_base/shared.lua
	2: C function	"match"
	3: Line 62	"playSound"		addons/expadv3/lua/expression3/extensions/sound.lua
	4: Line 194	"sound.play(n,n,s)"		addons/expadv3/lua/expression3/extensions/sound.lua
	5: Line 15	"nil"		Expression 3
	6: C function	"xpcall"
	7: Line 293	"Execute"		addons/expadv3/lua/entities/wire_expression3_base/shared.lua
	8: Line 262	"InitScript"		addons/expadv3/lua/entities/wire_expression3_base/shared.lua
	9: Line 63	"nil"		addons/expadv3/lua/entities/wire_expression3_base/shared.lua
}