I am using this code to try and force enable dead in the headlights:
but when I try to compile I get:
The perkaholic mod works fine, my additions are in bold. I assume I need to find something like #using scripts\zm\_zm_bgb_dead_in_headlights; but I can't find a GSC script for it.
How do I fix this error?
#using scripts\codescripts\struct;
#using scripts\shared\callbacks_shared;
#insert scripts\shared\shared.gsh;
#insert scripts\zm\_zm_utility.gsh;
//Perks
#using scripts\zm\_zm_perks;
#using scripts\zm\_zm_bgb;
#using scripts\zm\_zm_bgb_machine;
#using scripts\zm\_zm_bgb_token;
//include these because not all maps have them
#using scripts\zm\_zm_perk_deadshot;
#using scripts\zm\_zm_perk_widows_wine;
#using scripts\zm\_zm_perk_electric_cherry;
#namespace all_perks;
#namespace bgb;
function __init__() {
callback::on_spawned(&on_player_spawned);
}
function on_player_spawned() {
wait 5;
perkaholic();
self zm_bgb::give_bgb(zm_bgb_fear_in_headlights);
self thread revived();
}
function revived() {
self endon("death");
self endon("disconnect");
while (true) {
self waittill("player_revived");
perkaholic();
WAIT_SERVER_FRAME;
}
}
function perkaholic() {
all_perks = GetArrayKeys(level._custom_perks);
foreach (value in all_perks){
self zm_perks::give_perk(value, false);
}
self IPrintLnBold("All perks given, points shared.");
but when I try to compile I get:
I know that I'm probably using unnecessary scripts, this is my first mod and I copied from free perkaholic on steam: .^1ERR(6E) scripts/zm/gametypes/_clientids.gsc (26,1) : Compiler Internal Error : Uninitialized local variable 'zm_bgb_fear_in_headlights'
The perkaholic mod works fine, my additions are in bold. I assume I need to find something like #using scripts\zm\_zm_bgb_dead_in_headlights; but I can't find a GSC script for it.
How do I fix this error?