Garry's Mod

Garry's Mod

Nombat - Ambient/Combat Music
Major Oct 22, 2016 @ 6:02pm
[FIXED] Having Troubles with my own NOMBAT [FIXED]
!!! SEE THE ANSWERS BELOW FOR THE FIX !!!



So Gmod say that there's a problem with the path.
-------------------------------------------------------------------

Here is the error :

[NOMBAT DEBUG BEGIN] Set/Switch Song
Pack Path = 'nombat/acw/'
[NOMBAT] Error Song Time Tables Have Different Entrie Counts ( Time1 = 19 / Time2 = 20 )[NOMBAT DEBUG BEGIN] Set/Switch Song
Pack Path = 'nombat/acw/'
-------------------------------------------------------------------

Here is my .lua :

if SERVER then

resource.AddWorkshop("0123456789") --place you workshop addon number here ( I told you to copy it remember ;) )

end

if CLIENT then

function Nombat_Cl_Init( )

local pl = LocalPlayer() -- (DONT EDIT)

if IsValid(pl) then

if pl then

pl.NOMBAT_Level = 1 -- (DONT EDIT)
pl.NOMBAT_PostLevel = 1 -- (DONT EDIT)

local Ambient_Time = {47,43,262,150,27,178,178,75,53,59,56,62,16,33,46,36,62,79,68} --song time (in seconds)
pl.NOMBAT_Amb_Delay = CurTime() -- (DONT EDIT)

local Combat_Time = {257,153,45,164,83,42,132,63,75,38,69,65,177,66,66,264,225,235,270,230} --song time (in seconds)
pl.NOMBAT_Com_Delay = CurTime() -- (DONT EDIT)
pl.NOMBAT_Com_Cool = CurTime() -- (DONT EDIT)

local packName = "acw" --MAKE SURE THIS IS THE SAME AS THE FOLDER NAME HOLDING THE SOUNDS

packName = packName.."/" -- (DONT EDIT)

local subTable = { packName, Ambient_Time, Combat_Time } -- (DONT EDIT)

if !pl.NOMBAT_PackTable then -- (DONT EDIT)
pl.NOMBAT_PackTable = {subTable} -- (DONT EDIT)

else
table.insert( pl.NOMBAT_PackTable, subTable ) -- (DONT EDIT)
end

pl.NOMBAT_SVol = 0 -- (DONT EDIT)

end
end
end
hook.Add( "InitPostEntity", "Nombat_Cl_Init_acw", Nombat_Cl_Init ) -- change the "Nombat_Cl_Init_GAMENAME" to "Nombat_Cl_Init_" and your game name.

end
-------------------------------------------------------------------

Here is the locations :

Nombat Arma Cold War Assault\lua\autorun\nombat_ext_arma.lua

Nombat Arma Cold War Assault\sound\nombat\acw (folder with all .mp3) .

Thank you for help !
Last edited by Major; Oct 28, 2016 @ 12:23am
Showing 1-2 of 2 comments
LOL DUDE Oct 28, 2016 @ 12:12am 
This error is because you have 19 ambient songs and 20 combat songs, and the script will not work unless the number of ambient songs is exactly the same as the number of combat songs. To solve this with my own packs, I created 1 second long dummy MP3s to fill up the remaining spots to make the numbers match.
Major Oct 28, 2016 @ 12:22am 
Fixed but thanks I don't remove this thread it's for users that are having the same problem, by your way, they'll solve it so I live it here ^^.
Showing 1-2 of 2 comments
Per page: 1530 50