View previous topic :: View next topic |
Author |
Message |
Error Inside3D Staff

Joined: 05 Nov 2004 Posts: 558 Location: VA, USA
|
Posted: Sat Jun 28, 2008 7:16 pm Post subject: Loading Precaches with FRIK_FILE |
|
|
I've tried this with my code and code that GiffE gave me in #qc... and it just doesn't work.
I have these in a file that is loaded:
progs/player.mdl
progs/soldier.mdl
but can't make them precache. DP still says that I didn't precache player.mdl and tells me to fix my code.
if I get the time, I'll get on my lappy and paste the code. _________________ Inside3D : Knowledge Is Power
Darkplaces Documentation Wiki |
|
Back to top |
|
 |
Error Inside3D Staff

Joined: 05 Nov 2004 Posts: 558 Location: VA, USA
|
|
Back to top |
|
 |
Error Inside3D Staff

Joined: 05 Nov 2004 Posts: 558 Location: VA, USA
|
Posted: Sat Jun 28, 2008 7:23 pm Post subject: |
|
|
here is the code GiffE gave me, and can't figure out why it doesn't work:
Code: | void() precache_script =
{
local float f;
local string ln;
f = fopen("precache.txt", FILE_READ);
if (f != -1)
{
ln = fgets(f);
while(ln != string_null)
{
if(strstrofs(ln, ".wav",0) != -1)
precache_sound(ln);
else
precache_model(ln);
ln = fgets(f);
}
}
};
|
this is being called right from where I had normally done precaches _________________ Inside3D : Knowledge Is Power
Darkplaces Documentation Wiki |
|
Back to top |
|
 |
Error Inside3D Staff

Joined: 05 Nov 2004 Posts: 558 Location: VA, USA
|
|
Back to top |
|
 |
FrikaC Site Admin

Joined: 08 Oct 2004 Posts: 947
|
Posted: Sun Jun 29, 2008 6:26 am Post subject: |
|
|
Glad we could help. |
|
Back to top |
|
 |
GiffE
Joined: 08 Oct 2006 Posts: 141 Location: USA, CT
|
Posted: Mon Jun 30, 2008 2:03 am Post subject: |
|
|
It certainly does work Have used it quite a bit in the last few days.
It needs to have other file formats added to detect which to precache_model and which to precache_sound |
|
Back to top |
|
 |
|