Hello I am trying to make my train have sound effects but when ever I try to load a world the game gives me errors about my sound.lua code. I tried following the game in order to fix it but I cant and need help.
Here is my code:
local audioutil = require "audioutil"
function data()
return {
type = "GENERIC",
refDist = 25.0,
openDoors = "vehicle/MVG/open_door.wav",
closeDoors = "vehicle/MVG/close_door.wav",
horn = "vehicle/MVG/horn.wav",
params = {
tracks = {
{
clip = "vehicle/[...].wav",
gainCurve = {
nodes = audioutil.plotSqrt(.0, .1, 1.0, 1.0, 10)
},
pitchCurve = {
nodes = {
{ .0, 1.0 },
{ 1.0, 1.33 },
}
}
}
},
}
}
end
"MVG" is the sound folder in my mod