Unexpected TOKEN_USING..
Game Modding | Call of Duty: Black Ops 3 | Scripting
Koguchi :
So I'm mapping as I do usually, and suddenly when I go to compile and test my map, I get an error the launcher HAS NEVER thrown before. Keep in mind, I've been working on this map on and off for 3-4 months and I can't even launch the map due to an error that doesn't even seem to be there. When I checked said lines (83 & 6), those are two lines I have never had problems with and HAVE NOT TOUCHED OR CHANGED ant ANY point since the day I made the map. (except for line 83, which is Wardogs' perks, but that was copy and paste and I've had those in the map for a super long time and they're NEVER thrown errors until now - keep in mind once again that I have NOT touched these lines) It claims that "#using scripts\shared\exploder_shared;" is one of the errors and anything on line 83 is the other. Wardog had Electric herry and Widow's Wine in there too, EC was the first line throwing errors and then I deleted that, WW was on there second and the error persisted and now here we are at PHD. (I only deleted EC and WW cause they're not in my map now, I don't even have the files at current so I figured they weren't being used so they must have been the cause of the error, turns out that wasn't the case. Any help is appreciated! Thanks! The error:
********************************************************************************
UNRECOVERABLE ERROR :
^ 1 SCRIPT ERROR : No generated data for & #39;scripts/zm/zm_return.gsc'
ERR ( 0 ) scripts / zm / zm_return . gsc ( 83 , 6 ) : syntax error , unexpected TOKEN_USING , expecting $end : #using
Linker will now terminate .
********************************************************************************
My GSC:
#using scripts\codescripts\struct;
#using scripts\shared\array_shared;
#using scripts\shared\callbacks_shared;
#using scripts\shared\clientfield_shared;
#using scripts\shared\compass;
#using scripts\shared\exploder_shared;
#using scripts\shared\flag_shared;
#using scripts\shared\laststand_shared;
#using scripts\shared\math_shared;
#using scripts\shared\scene_shared;
#using scripts\shared\util_shared;
#insert scripts\shared\shared.gsh;
#insert scripts\shared\version.gsh;
#insert scripts\zm\_zm_utility.gsh;
#using scripts\zm\_load;
#using scripts\zm\_zm;
#using scripts\zm\_zm_audio;
#using scripts\zm\_zm_powerups;
#using scripts\zm\_zm_utility;
#using scripts\zm\_zm_weapons;
#using scripts\zm\_zm_zonemgr;
#using scripts\shared\ai\zombie_utility;
//Perks
#using scripts\zm\_zm_pack_a_punch;
#using scripts\zm\_zm_pack_a_punch_util;
#using scripts\zm\_zm_perk_additionalprimaryweapon;
#using scripts\zm\_zm_perk_doubletap2;
#using scripts\zm\_zm_perk_deadshot;
#using scripts\zm\_zm_perk_juggernaut;
#using scripts\zm\_zm_perk_quick_revive;
#using scripts\zm\_zm_perk_sleight_of_hand;
#using scripts\zm\_zm_perk_staminup;
//Powerups
#using scripts\zm\_zm_powerup_double_points;
#using scripts\zm\_zm_powerup_carpenter;
#using scripts\zm\_zm_powerup_fire_sale;
#using scripts\zm\_zm_powerup_free_perk;
#using scripts\zm\_zm_powerup_full_ammo;
#using scripts\zm\_zm_powerup_insta_kill;
#using scripts\zm\_zm_powerup_nuke;
//#using scripts\zm\_zm_powerup_weapon_minigun;
#using scripts\zm\_zm_easteregg_song;
#using scripts\zm\_zm_perks;
//Traps
#using scripts\zm\_zm_trap_electric;
#using scripts\zm\zm_usermap;
//-----Perk FX/Lights-----
#precache( "fx", "zombie/fx_perk_juggernaut_factory_zmb" );
#precache( "fx", "zombie/fx_perk_quick_revive_factory_zmb" );
#precache( "fx", "zombie/fx_perk_sleight_of_hand_factory_zmb" );
#precache( "fx", "zombie/fx_perk_doubletap2_factory_zmb" );
#precache( "fx", "zombie/fx_perk_daiquiri_factory_zmb" );
#precache( "fx", "zombie/fx_perk_stamin_up_factory_zmb" );
#precache( "fx", "zombie/fx_perk_mule_kick_factory_zmb" );
#define JUGGERNAUT_MACHINE_LIGHT_FX "jugger_light"
#define QUICK_REVIVE_MACHINE_LIGHT_FX "revive_light"
#define STAMINUP_MACHINE_LIGHT_FX "marathon_light"
#define WIDOWS_WINE_FX_MACHINE_LIGHT "widow_light"
#define SLEIGHT_OF_HAND_MACHINE_LIGHT_FX "sleight_light"
#define DOUBLETAP2_MACHINE_LIGHT_FX "doubletap2_light"
#define DEADSHOT_MACHINE_LIGHT_FX "deadshot_light"
#define ADDITIONAL_PRIMARY_WEAPON_MACHINE_LIGHT_FX "additionalprimaryweapon_light"
#define ELECTRIC_CHERRY_MACHINE_LIGHT_FX "electric_cherry_light"
#define PHD_PERK_MACHINE_LIGHT_FX "phd_light"
#define TOMBSTONE_PERK_MACHINE_LIGHT_FX "tombstone_light"
#define VULTURE_PERK_MACHINE_LIGHT_FX "vulture_light"
#define CHUGABUD_MACHINE_LIGHT_FX "chugabud_light"
//// WARDOGSK93: Start
// 3arc Perks
#using scripts\wardog\perk\_wardog_perk_phd;
#using scripts\wardog\perk\_wardog_perk_tombstone;
#using scripts\wardog\perk\_wardog_perk_vulture;
#using scripts\wardog\perk\_wardog_perk_fizz;
// Core
#using scripts\wardog\wardog_addon;
#using scripts\wardog\wardog_callback;
#using scripts\wardog\perk\_wardog_perk_hud;
//// WARDOGSK93: End
//// xSanchez78: Start
// Whos Who
#using scripts\zm\_zm_perk_chugabud;
//// xSanchez78: End
//*****************************************************************************
// MAIN
//*****************************************************************************
function main ()
{
// NSZ Kino Teleporter
level thread nsz_kino_teleporter :: init ();
level . random_pandora_box_start = true ;
//// WARDOGSK93: Start
wardog_addon :: pre_init ();
//// WARDOGSK93: End
zm_usermap :: main ();
//-----Perk FX/Lights-----
level thread perk_init ();
//// WARDOGSK93: Start
wardog_addon :: init ();
//// WARDOGSK93: End
//// xSanchez78: Start
level . register_offhand_weapons_for_level_defaults_override = & amp ; offhand_weapon_overrride ;
level . _zombie_custom_add_weapons = & amp ; custom_add_weapons ;
level . giveCustomCharacters = & amp ; giveCustomCharacters ;
level . _chugabud_post_respawn_override_func = & amp ; chugabud_post_respawn_func ;
//// xSanchez78: End
level . _zombie_custom_add_weapons =& amp ; custom_add_weapons ;
//Setup the levels Zombie Zone Volumes
level . zones = [];
level . zone_manager_init_func =& amp ; usermap_test_zone_init ;
init_zones [ 0 ] = "start_zone" ;
level thread zm_zonemgr :: manage_zones ( init_zones );
level thread add_zm_vox ();
//// WARDOGSK93: Start
wardog_addon :: post_init ();
//// WARDOGSK93: End
thread zm_easteregg_song :: init ();
zm_perks :: spare_change ();
level . default_laststandpistol = GetWeapon ( "t5_m1911_up" );
level . default_solo_laststandpistol = GetWeapon ( "t5_m1911_up" );
level . laststandpistol = level . default_laststandpistol ;
level . start_weapon = GetWeapon ( "t5_m1911" );
level thread set_perk_limit ( 10 ); // This sets the perk limit to 10
level . pathdist_type = PATHDIST_ORIGINAL ;
level . musicplay = false ;
thread musicplaying ();
}
function usermap_test_zone_init ()
{
zm_zonemgr :: add_adjacent_zone ( "start_zone" , "hallway_zone" , "enter_hallway_zone" );
zm_zonemgr :: add_adjacent_zone ( "hallway_zone" , "warehouse_zone" , "enter_warehouse_zone" );
zm_zonemgr :: add_adjacent_zone ( "warehouse_zone" , "basement_zone" , "enter_basement_zone" );
zm_zonemgr :: add_adjacent_zone ( "warehouse_zone" , "rooftop_zone" , "enter_rooftop_zone" );
zm_zonemgr :: add_adjacent_zone ( "warehouse_zone" , "gallery_zone" , "enter_gallery_zone" );
zm_zonemgr :: add_adjacent_zone ( "warehouse_zone" , "city_zone" , "enter_city_zone" );
zm_zonemgr :: add_adjacent_zone ( "city_zone" , "train_zone" , "enter_train_zone" );
zm_zonemgr :: add_adjacent_zone ( "city_zone" , "outside_vodka_zone" , "enter_outside_vodka_zone" );
zm_zonemgr :: add_adjacent_zone ( "outside_vodka_zone" , "outside_vodka_2_zone" , "enter_outside_vodka_2_zone" );
zm_zonemgr :: add_adjacent_zone ( "outside_vodka_2_zone" , "vodka_storage_zone" , "enter_vodka_storage_zone" );
zm_zonemgr :: add_adjacent_zone ( "outside_vodka_2_zone" , "vodka_mainfloor" , "enter_vodka_mainfloor" );
zm_zonemgr :: add_adjacent_zone ( "outside_vodka_zone" , "vodka_mainfloor_zone" , "enter_vodka_mainfloor_zone" );
zm_zonemgr :: add_adjacent_zone ( "vodka_mainfloor_zone" , "vodka_upstairs_zone" , "enter_vodka_upstairs_zone" );
zm_zonemgr :: add_adjacent_zone ( "vodka_mainfloor_zone" , "vodka_basement_zone" , "enter_vodka_basement_zone" );
level flag :: init ( "always_on" );
level flag :: set ( "always_on" );
}
function custom_add_weapons ()
{
zm_weapons :: load_weapon_spec_from_table ( "gamedata/weapons/zm/zm_levelcommon_weapons.csv" , 1 );
}
function set_perk_limit ( num )
{
wait ( 30 );
level . perk_purchase_limit = num ;
}
//// xSanchez78: Start
function offhand_weapon_overrride ()
{
level . zombie_lethal_grenade_player_init = GetWeapon ( "frag_grenade" );
level . zombie_melee_weapon_player_init = level . weaponBaseMelee ;
level . zombie_equipment_player_init = undefined ;
zm_utility :: register_lethal_grenade_for_level ( "frag_grenade" );
zm_utility :: register_melee_weapon_for_level ( level . weaponBaseMelee . name );
zm_utility :: register_tactical_grenade_for_level ( "cymbal_monkey" );
zm_utility :: register_tactical_grenade_for_level ( "octobomb" );
}
function giveCustomCharacters ()
{
if ( isdefined ( level . hotjoin_player_setup ) & amp ; & amp ; [[ level . hotjoin_player_setup ]]( "c_zom_farmgirl_viewhands" ))
return ;
self DetachAll ();
if ( ! isdefined ( self . characterIndex ))
self . characterIndex = zm_usermap :: assign_lowest_unused_character_index ();
self . favorite_wall_weapons_list = [];
self . talks_in_danger = false ;
self SetCharacterBodyType ( self . characterIndex );
self SetCharacterBodyStyle ( 0 );
self SetCharacterHelmetStyle ( 0 );
switch ( self . characterIndex )
{
case 0 :
self . favorite_wall_weapons_list [ self . favorite_wall_weapons_list . size ] = GetWeapon ( "frag_grenade" );
self . favorite_wall_weapons_list [ self . favorite_wall_weapons_list . size ] = GetWeapon ( "bouncingbetty" );
self . whos_who_shader = "c_zom_der_dempsey_mpc_fb" ;
break ;
case 1 :
self . favorite_wall_weapons_list [ self . favorite_wall_weapons_list . size ] = GetWeapon ( "870mcs" );
self . whos_who_shader = "c_zom_der_nikolai_mpc_fb" ;
break ;
case 3 :
self . favorite_wall_weapons_list [ self . favorite_wall_weapons_list . size ] = GetWeapon ( "hk416" );
self . whos_who_shader = "c_zom_der_takeo_mpc_fb" ;
break ;
case 2 :
self . talks_in_danger = true ;
level . rich_sq_player = self ;
level . sndRadioA = self ;
self . favorite_wall_weapons_list [ self . favorite_wall_weapons_list . size ] = GetWeapon ( "pistol_standard" );
self . whos_who_shader = "c_zom_der_richtofen_mpc_fb" ;
break ;
}
self SetMoveSpeedScale ( 1 );
self SetSprintDuration ( 4 );
self SetSprintCooldown ( 0 );
self thread zm_usermap :: set_exert_id ();
}
function chugabud_post_respawn_func ( v_new_player_position )
{
weapon_powerup_array = [];
keys = GetArrayKeys ( level . zombie_powerups );
for ( i = 0 ; i & lt ; keys . size ; i ++ )
{
if ( isdefined ( level . _custom_powerups ) & amp ; & amp ; isdefined ( level . _custom_powerups [ keys [ i ]]) & amp ; & amp ; isdefined ( level . _custom_powerups [ keys [ i ]] . weapon_countdown ))
weapon_powerup_array [ weapon_powerup_array . size ] = keys [ i ];
}
weapon_powerup = undefined ;
if ( isdefined ( self . loadout ))
{
for ( i = 0 ; i & lt ; self . loadout . weapons . size ; i ++ )
{
for ( j = 0 ; j & lt ; weapon_powerup_array . size ; j ++ )
{
if ( self . loadout . weapons [ i ][ "weapon" ] == level . zombie_powerup_weapon [ weapon_powerup_array [ j ]])
{
weapon_powerup = weapon_powerup_array [ j ];
break ;
}
}
}
}
if ( isdefined ( weapon_powerup ))
{
level thread zm_powerups :: weapon_powerup_remove ( self , weapon_powerup + "_time_over" , weapon_powerup , false );
weapons = [];
index = 0 ;
for ( i = 0 ; i & lt ; self . loadout . weapons . size ; i ++ )
{
if ( self . loadout . weapons [ i ][ "weapon" ] == level . zombie_powerup_weapon [ weapon_powerup ])
continue ;
weapons [ index ] = self . loadout . weapons [ i ];
index ++ ;
}
self . loadout . weapons = weapons ;
if ( isdefined ( self . _zombie_weapon_before_powerup ) & amp ; & amp ; isdefined ( self . _zombie_weapon_before_powerup [ weapon_powerup ]))
{
current_weapon = self . _zombie_weapon_before_powerup [ weapon_powerup ];
for ( i = 0 ; i & lt ; self . loadout . weapons . size ; i ++ )
{
if ( self . loadout . weapons [ i ][ "weapon" ] == current_weapon || self . loadout . weapons [ i ][ "weapon" ] . altWeapon == current_weapon )
{
self . loadout . current_weapon = i ;
break ;
}
}
}
}
}
//// xSanchez78: End
function add_zm_vox ()
{
zm_audio :: loadPlayerVoiceCategories ( "gamedata/audio/zm/zm_vox.csv" );
}