Raised This Month: $32 Target: $400
 8% 

[solved] while or contain(i) bug?


Post New Thread Reply   
 
Thread Tools Display Modes
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 02-08-2015 , 11:21   Re: [solved] while or contain(i) bug?
Reply With Quote #11

Quote:
Originally Posted by Arkshine View Post
It doesn't hurt for sure if you don't care about filling the sounds array (512 items) for nothing.
Can you show me a better way?
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-08-2015 , 13:11   Re: [solved] while or contain(i) bug?
Reply With Quote #12

Quote:
Originally Posted by georgik57 View Post
Can you show me a better way?
Only precache ones that need to be downloaded.
__________________
fysiks is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 02-09-2015 , 05:14   Re: [solved] while or contain(i) bug?
Reply With Quote #13

Quote:
Originally Posted by fysiks View Post
Only precache ones that need to be downloaded.
Well for that I would need to make a full list of default sounds and skip precaching when they come up(will probably need to do another for before actually precaching the detected sound). I can't see any other way.
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-09-2015 , 07:17   Re: [solved] while or contain(i) bug?
Reply With Quote #14

You don't check if file exists by the way. If doesn't exist in current mod directory, you assume it's sounds from valve. You could check from valve directory too.
__________________
Arkshine is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 02-09-2015 , 12:59   Re: [solved] while or contain(i) bug?
Reply With Quote #15

Quote:
Originally Posted by Arkshine View Post
You don't check if file exists by the way.
Is it really necessary? It's just a sound file, unlike a .mdl or .spr which can crash the server.
Quote:
Originally Posted by Arkshine View Post
If doesn't exist in current mod directory, you assume it's sounds from valve. You could check from valve directory too.
Doesn't file exists native work for current mod only?
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-09-2015 , 13:41   Re: [solved] while or contain(i) bug?
Reply With Quote #16

Any resources you want to precache from mod directory, you should always check if file exists.
For valve sounds, you can use the native with ../valve/sound/fvox it will work, if file exists you don't precache.
__________________
Arkshine is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 02-16-2015 , 22:06   Re: [solved] while or contain(i) bug?
Reply With Quote #17

Quote:
Originally Posted by Arkshine View Post
Any resources you want to precache from mod directory, you should always check if file exists.
For valve sounds, you can use the native with ../valve/sound/fvox it will work, if file exists you don't precache.
I thought about this and I think the best way is to just make another plugin specially for unprecaching all the unnecessary resources, instead of checking for them in all the plugins.
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:15.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode