Raised This Month: $ Target: $400
 0% 

Precache Issue With Read_File


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 06-09-2006 , 09:52   Precache Issue With Read_File
Reply With Quote #1

Hmm, I created this plugin to read the NPC's via file and it needs to precache the specified models in the 6th arguement, problem is, it doesn't precache it right away and the server crashes.

How can I fix this?
Thanks.
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 06-09-2006 , 10:03  
Reply With Quote #2

Remove the set_task on initialize_npcs and just do a straight function call in plugin_init.

EDIT: oh, and by the way, your script sucks. Read the optimization tips in the wiki.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 06-09-2006 , 10:09  
Reply With Quote #3

Quote:
Originally Posted by Hawk552
Remove the set_task on initialize_npcs and just do a straight function call in plugin_init.

EDIT: oh, and by the way, your script sucks. Read the optimization tips in the wiki.
Sill get the error.
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 06-09-2006 , 10:10  
Reply With Quote #4

Quote:
Originally Posted by mysticssjgoku4
Quote:
Originally Posted by Hawk552
Remove the set_task on initialize_npcs and just do a straight function call in plugin_init.

EDIT: oh, and by the way, your script sucks. Read the optimization tips in the wiki.
Sill get the error.
Call it in plugin_precache then. My guess is that it's reading the file after it attempts to precache.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 06-09-2006 , 10:16  
Reply With Quote #5

*Updated: Fixed nvm.*
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
Reply



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 16:34.


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