PDA

View Full Version : precaching more than once



Ni3ls
26th April 2016, 10:01
Script tried to precache the menu 'ingame' more than once
Script tried to precache the menu 'team_britishgerman' more than once
Script tried to precache the menu 'weapon_british' more than once
Script tried to precache the menu 'weapon_german' more than once
Script tried to precache the menu 'callvote' more than once
Script tried to precache the menu 'muteplayer' more than once
Script tried to precache the player head icon 'headicon_british' more than once
Script tried to precache the player head icon 'headicon_german' more than once

Those are stock cod2 menus and I dont have any other scripts that precache them. How is this possible? And how to fix this?

voron00
26th April 2016, 10:08
you might be calling your menus init twice perhaps? Check everything. If you use notepad++ or something similar use Find in files, i had similar stuff but sorted it pretty quckly with this.

Ni3ls
26th April 2016, 10:23
If you use notepad++ or something similar use Find in files
Im using ++, how to use that function?

IzNoGoD
26th April 2016, 10:25
you're probably fast_restarting, sd round-restart triggers this stuff.

Its not harmful.
If you feel really worried, you could check if the game["menu_thingy"] isdefined before precaching.
Gotto do some custom shit for headicons

voron00
26th April 2016, 10:28
Oh yeah and as IzNo mentioned, for SD like gametypes use this: https://github.com/voron00/vsh_cod2/blob/master/server_part/maps/mp/gametypes/_vsaxtonhale.gsc#L23

Ni3ls
26th April 2016, 10:35
Yes its SD gametype.
@Voron I dont get what I should learn from that? What's the difference? My sd.gsc already looks like the thing with gamestarted

voron00
26th April 2016, 10:45
Use this definition for the rest of your precaches, menu stuff and headicons:
https://github.com/voron00/vsh_cod2/blob/master/server_part/maps/mp/gametypes/_menus.gsc#L3
https://github.com/voron00/vsh_cod2/blob/master/server_part/maps/mp/gametypes/_friendicons.gsc#L8

IzNoGoD
26th April 2016, 10:48
The only thing you're fixing by doing all of this is removing 8 lines of log from the console. The rest (backend etc) is unaffected anyway.

Backend caught a "trying to double-precache" and prevented the double-precache from happening. Which is EXACTLY what you'll do with your .gsc modification.