PDA

View Full Version : [TF2] Issue precaching sounds?


Drixevel
11-15-2014, 16:20
It's probably obvious but I can't seem to find the discrepancy.

Location:

...\tf\sound\folder\imyourmedic.mp3


Trace:

L 11/15/2014 - 15:09:13: Precaching folder/imyourmedic.mp3...
L 11/15/2014 - 15:09:13: Adding file to downloads: folder/imyourmedic.mp3 [sound/folder/imyourmedic.mp3]


sFile = folder/imyourmedic.mp3

Code: (OnMapStart)

if (PrecacheSound(sFile, true))
{
decl String:sDownload[PLATFORM_MAX_PATH];
Format(sDownload, sizeof(sDownload), "sound/%s", sFile);
AddFileToDownloadsTable(sDownload);
TraceLogs("Adding file to downloads: %s [%s]", sFile, sDownload);
}


Error on play:

SV_StartSound: sound/folder/imyourmedic.mp3 not precached (0)
SV_StartSound: sound/folder/imyourmedic.mp3 not precached (0)


Thank you friends.

11530
11-16-2014, 00:08
Your error says sound/folder/imyourmedic.mp3 though you say above that it's sound/musicfortress/imyourmedic.mp3 - wrong file path? Failing that, are you using this in OnMapStart()?

Drixevel
11-16-2014, 03:09
Your error says sound/folder/imyourmedic.mp3 though you say above that it's sound/musicfortress/imyourmedic.mp3 - wrong file path? Failing that, are you using this in OnMapStart()?

My apologies, I copied/pasted the currently set variable. I changed the path to 'folder' to give an example since the folder name changes with the code.

I double checked the folder name & they're the same.