AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Help] Precaching Model Wierdness (https://forums.alliedmods.net/showthread.php?t=93632)

Zombie Lurker 05-31-2009 07:26

[Help] Precaching Model Wierdness
 
Hey everyone. I've made a private plugin for myself but I have a wierd problem. In the plugin there is a code to precache some models. For some reason, whenever I start a room, my game always crashes. Here is the line of code which precaches the models.
PHP Code:

new const speed_zombi[] = {
 
"models/player/speed_zombi_host/speed_zombi_host.mdl"
 
"models/player/speed_zombi_origin/speed_zombi_origin.mdl"
}
 
public 
plugin_precache() {
 new 
i
 
for(0sizeof speed_zombii++)
  
precache_model(speed_zombi[i])


and when I start the game I get this error.

---------------------------
Fatal Error
---------------------------
Mod_NumForName: odels/player/speed_zombi_host/speed_zombi_host.mdl not found
---------------------------
OK
---------------------------

Why does the Mod_NumForName change the location from models to odels? I dont understand that. Hope to get some replies with help soon.

Arkshine 05-31-2009 07:27

Re: [Help] Precaching Model Wierdness
 
new const speed_zombi[] -> new const speed_zombi[][]

Zombie Lurker 05-31-2009 07:36

Re: [Help] Precaching Model Wierdness
 
Thanks. It works now.


All times are GMT -4. The time now is 13:49.

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