Inside3D!
     

Loading Precaches with FRIK_FILE

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
Error
Inside3D Staff


Joined: 05 Nov 2004
Posts: 558
Location: VA, USA

PostPosted: Sat Jun 28, 2008 7:16 pm    Post subject: Loading Precaches with FRIK_FILE Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Error
Inside3D Staff


Joined: 05 Nov 2004
Posts: 558
Location: VA, USA

PostPosted: Sat Jun 28, 2008 7:17 pm    Post subject: Reply with quote

I'm basically trying to make it possible for people to add new content just through my npc scripting language.
_________________
Inside3D : Knowledge Is Power
Darkplaces Documentation Wiki
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Error
Inside3D Staff


Joined: 05 Nov 2004
Posts: 558
Location: VA, USA

PostPosted: Sat Jun 28, 2008 7:23 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Error
Inside3D Staff


Joined: 05 Nov 2004
Posts: 558
Location: VA, USA

PostPosted: Sun Jun 29, 2008 6:23 am    Post subject: Reply with quote

looks like I got it, nm
_________________
Inside3D : Knowledge Is Power
Darkplaces Documentation Wiki
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
FrikaC
Site Admin


Joined: 08 Oct 2004
Posts: 947

PostPosted: Sun Jun 29, 2008 6:26 am    Post subject: Reply with quote

Glad we could help.
Back to top
View user's profile Send private message Send e-mail
GiffE



Joined: 08 Oct 2006
Posts: 141
Location: USA, CT

PostPosted: Mon Jun 30, 2008 2:03 am    Post subject: Reply with quote

It certainly does work Smile 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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group