Raised This Month: $51 Target: $400
 12% 

Precache Problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
rodrigo286
Veteran Member
Join Date: Sep 2010
Location: Brazil, São Paulo
Old 04-17-2011 , 10:29   Precache Problem
Reply With Quote #1

Can not find the problem, can you help me?

PHP Code:
        if(strcmp(info"Latinha RedBull") == 0)
        {
            
phrase "a Latinha RedBull";
            
PrecacheModel("models/286models171/props171/latinha_red_bull.mdl" true);    
            
PrecacheModel("materials/286models171/props171/latinha_red_bull/latinha_red_bull_base.vmt" true);    
            
PrecacheModel("materials/286models171/props171/latinha_red_bull/latinha_red_bull_base.vtf" true);
            
PrecacheModel("materials/286models171/props171/latinha_red_bull/latinha_red_bull_tampa.vmt" true);    
            
PrecacheModel("materials/286models171/props171/latinha_red_bull/latinha_red_bull_tampa.vtf" true);
            
PrecacheModel("materials/286models171/props171/latinha_red_bull/textura_lata_redbull.vmt" true);    
            
PrecacheModel("materials/286models171/props171/latinha_red_bull/textura_lata_redbull.vtf" true);            
            
PrecacheModel("materials/286models171/props171/latinha_red_bull/textura_lata_redbull_lados.vmt" true);    
            
PrecacheModel("materials/286models171/props171/latinha_red_bull/textura_lata_redbull_lados.vtf" true);
            
PrecacheModel("materials/286models171/props171/latinha_red_bull/textura_lata_redbull_lados2.vmt" true);    
            
PrecacheModel("materials/286models171/props171/latinha_red_bull/textura_lata_redbull_lados2.vtf" true);            
            
PrecacheModel("materials/286models171/props171/latinha_red_bull/textura_lata_redbull2.vmt" true);    
            
PrecacheModel("materials/286models171/props171/latinha_red_bull/textura_lata_redbull2.vtf" true);    
            
AddMenuItem(dynmcmenu"Fountain""Fountain");
            
AddMenuItem(dynmcmenu"Jeep""Jeep");
            
AddMenuItem(dynmcmenu"Lamppost""Lamppost");
            
AddMenuItem(dynmcmenu"Pipe""Pipe");
            
AddMenuItem(dynmcmenu"Propane Machine""Propane Machine");
            
AddMenuItem(dynmcmenu"Rock""Rock");
            
AddMenuItem(dynmcmenu"Fabric Sofa""Fabric Sofa");
            
AddMenuItem(dynmcmenu"Table""Table");
            
AddMenuItem(dynmcmenu"Tank""Tank");
            
AddMenuItem(dynmcmenu"Toilet""Toilet");
            
AddMenuItem(dynmcmenu"Wooden Box""Wooden Box");
            
AddMenuItem(dynmcmenu"Latinha RedBull""Latinha RedBull");
            
SetMenuExitBackButton(dynmcmenutrue);
            
DisplayMenu(dynmcmenuclient0);
            
FakeClientCommandEx(client"menuselect 9");
        } 
This error occurs when you change your map.

PHP Code:
286models171/props171/latinha_red_bull/latinha_red_bull_base
CMaterial
::PrecacheVarserror loading vmt file for 286models171/props171/latinha_red_bull/latinha_red_bull_tampa
CMaterial
::PrecacheVarserror loading vmt file for 286models171/props171/latinha_red_bull/textura_lata_redbull_lados
CMaterial
::PrecacheVarserror loading vmt file for 286models171/props171/latinha_red_bull/textura_lata_redbull
CMaterial
::PrecacheVarserror loading vmt file for 286models171/props171/latinha_red_bull/textura_lata_redbull_lados2
CMaterial
::PrecacheVarserror loading vmt file for 286models171/props171/latinha_red_bull/textura_lata_redbull2

Regards.
rodrigo286 is offline
FoxMulder
Senior Member
Join Date: Jan 2009
Location: Orlando, FL
Old 04-17-2011 , 11:03   Re: Precache Problem
Reply With Quote #2

You don't need to Precache those textures as they will automatically be loaded when the model is precached.

Also instead of doing
PHP Code:
FakeClientCommandEx(client"menuselect 9"); 
consider using DisplayMenuAtItem (http://docs.sourcemod.net/api/index....d=show&id=183&)
__________________

Last edited by FoxMulder; 04-17-2011 at 11:05.
FoxMulder is offline
rodrigo286
Veteran Member
Join Date: Sep 2010
Location: Brazil, São Paulo
Old 04-17-2011 , 11:28   Re: Precache Problem
Reply With Quote #3

PHP Code:
        }
        if(
strcmp(info"Latinha RedBull") == 0)
        {
            
phrase "a Latinha RedBull";
            
PrecacheModel("models/286models171/props171/latinha_red_bull.mdl" true);    
            
modelname "models/286models171/props171/latinha_red_bull.mdl";
            
AddMenuItem(dynmcmenu"Fountain""Fountain");
            
AddMenuItem(dynmcmenu"Jeep""Jeep");
            
AddMenuItem(dynmcmenu"Lamppost""Lamppost");
            
AddMenuItem(dynmcmenu"Pipe""Pipe");
            
AddMenuItem(dynmcmenu"Propane Machine""Propane Machine");
            
AddMenuItem(dynmcmenu"Rock""Rock");
            
AddMenuItem(dynmcmenu"Fabric Sofa""Fabric Sofa");
            
AddMenuItem(dynmcmenu"Table""Table");
            
AddMenuItem(dynmcmenu"Tank""Tank");
            
AddMenuItem(dynmcmenu"Toilet""Toilet");
            
AddMenuItem(dynmcmenu"Wooden Box""Wooden Box");
            
AddMenuItem(dynmcmenu"Latinha RedBull""Latinha RedBull");
            
SetMenuExitBackButton(dynmcmenutrue);
            
DisplayMenu(dynmcmenuclient0);
            
FakeClientCommandEx(client"menuselect 9"); 
The correct thing?

My prop is in directory:

cstrike/models/286models171/props171/latinha_red_bull.mdl

Regards.

Last edited by rodrigo286; 04-17-2011 at 11:43.
rodrigo286 is offline
FoxMulder
Senior Member
Join Date: Jan 2009
Location: Orlando, FL
Old 04-17-2011 , 11:43   Re: Precache Problem
Reply With Quote #4

You should do something like
PHP Code:
Format(modelnamesizeof(modelname), "models/286models171/props171/latinha_red_bull.mdl")
PrecacheModel(modelnametrue); 
Are those variables phrase and modelname being used elsewhere? If so that's not how you declare strings in Sourcemod.

Quote:
Originally Posted by FoxMulder View Post
Refer to:
http://wiki.alliedmods.net/Introduct...cePawn#Strings
http://docs.sourcemod.net/api/index....d=show&id=620&

In SourcePawn you can't do
PHP Code:
itemType "weapons"
instead do

PHP Code:
Format(itemType sizeof(itemType ), "weapons"); 
__________________

Last edited by FoxMulder; 04-17-2011 at 11:46.
FoxMulder is offline
rodrigo286
Veteran Member
Join Date: Sep 2010
Location: Brazil, São Paulo
Old 04-17-2011 , 11:58   Re: Precache Problem
Reply With Quote #5

Correct?

PHP Code:
        }
        if(
strcmp(info"latinha_red_bull") == 0)
        {
            
phrase "a Latinha RedBull";
            
Format(modelnamesizeof(modelname), "models/286models171/props171/latinha_red_bull.mdl")
            
PrecacheModel(modelnametrue);
            
modelname "models/286models171/props171/latinha_red_bull.mdl";
            
AddMenuItem(dynmcmenu"Fountain""Fountain");
            
AddMenuItem(dynmcmenu"Jeep""Jeep");
            
AddMenuItem(dynmcmenu"Lamppost""Lamppost");
            
AddMenuItem(dynmcmenu"Pipe""Pipe");
            
AddMenuItem(dynmcmenu"Propane Machine""Propane Machine");
            
AddMenuItem(dynmcmenu"Rock""Rock");
            
AddMenuItem(dynmcmenu"Fabric Sofa""Fabric Sofa");
            
AddMenuItem(dynmcmenu"Table""Table");
            
AddMenuItem(dynmcmenu"Tank""Tank");
            
AddMenuItem(dynmcmenu"Toilet""Toilet");
            
AddMenuItem(dynmcmenu"Wooden Box""Wooden Box");
            
AddMenuItem(dynmcmenu"Latinha RedBull""Latinha RedBull");
            
SetMenuExitBackButton(dynmcmenutrue);
            
DisplayMenu(dynmcmenuclient0);
            
FakeClientCommandEx(client"menuselect 9"); 
rodrigo286 is offline
FoxMulder
Senior Member
Join Date: Jan 2009
Location: Orlando, FL
Old 04-17-2011 , 12:01   Re: Precache Problem
Reply With Quote #6

-_- no. remember you can't do

PHP Code:
phrase "a Latinha RedBull"
Anyways are you still receiving your original error?
__________________
FoxMulder is offline
rodrigo286
Veteran Member
Join Date: Sep 2010
Location: Brazil, São Paulo
Old 04-17-2011 , 13:17   Re: Precache Problem
Reply With Quote #7

same error:

PHP Code:
286models171/props171/latinha_red_bull/latinha_red_bull_base
CMaterial
::PrecacheVarserror loading vmt file for 286models171/props171/latinha_red_bull/latinha_red_bull_tampa
CMaterial
::PrecacheVarserror loading vmt file for 286models171/props171/latinha_red_bull/textura_lata_redbull_lados
CMaterial
::PrecacheVarserror loading vmt file for 286models171/props171/latinha_red_bull/textura_lata_redbull
CMaterial
::PrecacheVarserror loading vmt file for 286models171/props171/latinha_red_bull/textura_lata_redbull_lados2
CMaterial
::PrecacheVarserror loading vmt file for 286models171/props171/latinha_red_bull/textura_lata_redbull2 
I'm using dedicated server with centOS...

PHP Code:
        }
        if(
strcmp(info"Latinha RedBull") == 0)
        {
            
phrase "a Latinha RedBull";
            
Format(modelnamesizeof(modelname), "models/286models171/props171/latinha_red_bull.mdl")
            
PrecacheModel(modelnametrue);
            
modelname "models/286models171/props171/latinha_red_bull.mdl";
            
prop_dynamic_create(client);
            new 
Handle:dynmcmenu CreateMenu(MenuHandler1);
            
SetMenuTitle(dynmcmenu"[czsadmins] Dynamic Props");
            
AddMenuItem(dynmcmenu"Delete Prop""Delete Prop");
            
AddMenuItem(dynmcmenu"RotXD45""Rotate X +45 Degrees");
            
AddMenuItem(dynmcmenu"RotYD45""Rotate Y +45 Degrees");
            
AddMenuItem(dynmcmenu"RotZD45""Rotate Z +45 Degrees");
            
AddMenuItem(dynmcmenu"Blastdoor""Blastdoor");
            
AddMenuItem(dynmcmenu"Fountain""Fountain");
            
AddMenuItem(dynmcmenu"Jeep""Jeep");
            
AddMenuItem(dynmcmenu"Lamppost""Lamppost");
            
AddMenuItem(dynmcmenu"Pipe""Pipe");
            
AddMenuItem(dynmcmenu"Propane Machine""Propane Machine");
            
AddMenuItem(dynmcmenu"Rock""Rock");
            
AddMenuItem(dynmcmenu"Fabric Sofa""Fabric Sofa");
            
AddMenuItem(dynmcmenu"Table""Table");
            
AddMenuItem(dynmcmenu"Tank""Tank");
            
AddMenuItem(dynmcmenu"Toilet""Toilet");
            
AddMenuItem(dynmcmenu"Wooden Box""Wooden Box");
            
AddMenuItem(dynmcmenu"Latinha RedBull""Latinha RedBull");
            
SetMenuExitBackButton(dynmcmenutrue);
            
DisplayMenu(dynmcmenuclient0);
            
FakeClientCommandEx(client"menuselect 9"); 
rodrigo286 is offline
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 17:00.


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