UGX-Mods

Call of Duty 5: World at War => Help Desk => Topic started by: DrinkingSpace60 on July 12, 2016, 07:28:00 am

Title: bad syntax: (file 'maps/customap1.gsc', line 9) main();
Post by: DrinkingSpace60 on July 12, 2016, 07:28:00 am
need help fixing this error, this is my first map so assume im a noob :alone:
Title: Re: bad syntax: (file 'maps/customap1.gsc', line 9) main();
Post by: IperBreach86 on July 13, 2016, 11:04:27 am
need help fixing this error, this is my first map so assume im a noob :alone:
Maybe post a screen of your gsc? No? Ok
Anyway try removing the semi-colon after main(); then save and recompile the mod.
If it doesnt work post a screen of your GSC.
Title: Re: bad syntax: (file 'maps/customap1.gsc', line 9) main();
Post by: DrinkingSpace60 on July 13, 2016, 03:35:07 pm
this is my customap1.gsc file

Code Snippet
Plaintext
main()
{
   level.DLC3 = spawnStruct(); // Leave This Line Or Else It Breaks Everything
   
   // Must Change These To Your Maps
   level.DLC3.createArt = maps\createart\nazi_zombie_field_art::main;
   level.DLC3.createFX = maps\createfx\nazi_zombie_field_fx::main;
   // level.DLC3.myFX = ::preCacheMyFX;
   
   /*--------------------
    FX
   ----------------------*/
   DLC3_FX();
   
   /*--------------------
    LEVEL VARIABLES
   ----------------------*/   
   
   // Variable Containing Helpful Text For Modders -- Don't Remove
   level.modderHelpText = [];
   
   //
   // Change Or Tweak All Of These LEVEL.DLC3 Variables Below For Your Level If You Wish
   //
   
   // Edit The Value In Mod.STR For Your Level Introscreen Place
   level.DLC3.introString = &"nazi zombie tes";
   
   // Weapons. Pointer function automatically loads weapons used in Der Riese.
   level.DLC3.weapons = maps\dlc3_code::include_weapons;
   
   // Power Ups. Pointer function automatically loads power ups used in Der Riese.
   level.DLC3.powerUps =  maps\dlc3_code::include_powerups;
   
   // Adjusts how much melee damage a player with the perk will do, needs only be set once. Stock is 1000.
   level.DLC3.perk_altMeleeDamage = 1000;
   
   // Adjusts barrier search override. Stock is 400.
   level.DLC3.barrierSearchOverride = 400;
   
   // Adjusts power up drop max per round. Stock is 3.
   level.DLC3.powerUpDropMax = 3;
   
   // _loadout Variables
   level.DLC3.useCoopHeroes = true;
   
   // Bridge Feature
   level.DLC3.useBridge = false;
   
   // Hell Hounds
   level.DLC3.useHellHounds = true;
   
   // Mixed Rounds
   level.DLC3.useMixedRounds = true;
   
   // Magic Boxes -- The Script_Noteworthy Value Names On Purchase Trigger In Radiant
   boxArray = [];
   boxArray[ boxArray.size ] = "start_chest";
   boxArray[ boxArray.size ] = "chest1";
   boxArray[ boxArray.size ] = "chest2";
   boxArray[ boxArray.size ] = "chest3";
   boxArray[ boxArray.size ] = "chest4";
   boxArray[ boxArray.size ] = "chest5";
   level.DLC3.PandoraBoxes = boxArray;
   
   // Initial Zone(s) -- Zone(s) You Want Activated At Map Start
   zones = [];
   zones[ zones.size ] = "start_zone";
   level.DLC3.initialZones = zones;
   
   // Electricity Switch -- If False Map Will Start With Power On
   level.DLC3.useElectricSwitch = true;
   
   // Electric Traps
   level.DLC3.useElectricTraps = true;
   
   // _zombiemode_weapons Variables
   level.DLC3.usePandoraBoxLight = true;
   level.DLC3.useChestPulls = true;
   level.DLC3.useChestMoves = true;
   level.DLC3.useWeaponSpawn = true;
   level.DLC3.useGiveWeapon = true;
   
   // _zombiemode_spawner Varibles
   level.DLC3.riserZombiesGoToDoorsFirst = true;
   level.DLC3.riserZombiesInActiveZonesOnly = true;
   level.DLC3.assureNodes = true;
   
   // _zombiemode_perks Variables
   level.DLC3.perksNeedPowerOn = true;
   
   // _zombiemode_devgui Variables
   level.DLC3.powerSwitch = true;
   
   /*--------------------
    FUNCTION CALLS - PRE _Load
   ----------------------*/
   level thread DLC3_threadCalls();
   
   /*--------------------
    ZOMBIE MODE
   ----------------------*/
   [[level.DLC3.weapons]]();
   [[level.DLC3.powerUps]]();
   
   maps\_zombiemode::main();
   setVolFog(200, 1500, 350, 100, 0.4, 0.425, 0.44, 0.0);

   maps\_zombiemode_perks_black_ops::bo_perks_thread();
   //thread anti_cheat();
   
   /*--------------------
    FUNCTION CALLS - POST _Load
   ----------------------*/
   level.zone_manager_init_func = ::dlc3_zone_init;
   level thread DLC3_threadCalls2();
} //
Title: Re: bad syntax: (file 'maps/customap1.gsc', line 9) main();
Post by: thezombieproject on July 13, 2016, 06:01:13 pm
also try removing the &
level.DLC3.introString = &"nazi zombie tes";
so it looks like this
level.DLC3.introString = "nazi zombie tes";

build mod and try again
Title: Re: bad syntax: (file 'maps/customap1.gsc', line 9) main();
Post by: DrinkingSpace60 on July 13, 2016, 06:26:05 pm
server script compile error
could not find script
'maps/createart/nazi_zombie_field_art'
level.dlc.createart =
maps\createart\nazi_zombie_field_art::main;
Title: Re: bad syntax: (file 'maps/customap1.gsc', line 9) main();
Post by: DrinkingSpace60 on August 03, 2016, 08:08:19 pm
bump
Title: Re: bad syntax: (file 'maps/customap1.gsc', line 9) main();
Post by: steviewonder87 on August 03, 2016, 09:16:20 pm
Did you use a script placer?
Title: Re: bad syntax: (file 'maps/customap1.gsc', line 9) main();
Post by: JR-Imagine on August 03, 2016, 10:22:27 pm
Did you use a script placer?
Looks like Script Placer Z 1.x, hella outdated and quite broken most likely.

I'd recommend OP to regenerate with the updated version: http://revmods.me/spz/release.zip (http://revmods.me/spz/release.zip)

Edit: If I'm being completely honest, you're probably better off using a more barebones script placer. The perks included with this build are hella outdated (3.x whilst Harry's currently on 5.x) so it's better if you were to just install them using the instructions in his thread.
Title: Re: bad syntax: (file \'maps/customap1.gsc\', line 9) main();
Post by: DrinkingSpace60 on August 04, 2016, 07:49:59 pm
i rebuilt the mod and still the same error

Double Post Merge: August 04, 2016, 08:06:32 pm
ok i rebuild the mod once again and got "Could not find script 'clientscripts/_dual_wield'
thread clientscripts\_dual_wield::init();"
Title: Re: bad syntax: (file \'maps/customap1.gsc\', line 9) main();
Post by: TheChattyGamer on August 09, 2016, 04:38:45 am
this is my customap1.gsc file

Code Snippet
Plaintext
main()
{
   level.DLC3 = spawnStruct(); // Leave This Line Or Else It Breaks Everything
   
   // Must Change These To Your Maps
   level.DLC3.createArt = maps\createart\nazi_zombie_field_art::main;
   level.DLC3.createFX = maps\createfx\nazi_zombie_field_fx::main;
   // level.DLC3.myFX = ::preCacheMyFX;
   
   /*--------------------
    FX
   ----------------------*/
   DLC3_FX();
   
   /*--------------------
    LEVEL VARIABLES
   ----------------------*/   
   
   // Variable Containing Helpful Text For Modders -- Don't Remove
   level.modderHelpText = [];
   
   //
   // Change Or Tweak All Of These LEVEL.DLC3 Variables Below For Your Level If You Wish
   //
   
   // Edit The Value In Mod.STR For Your Level Introscreen Place
   level.DLC3.introString = &"nazi zombie tes";
   
   // Weapons. Pointer function automatically loads weapons used in Der Riese.
   level.DLC3.weapons = maps\dlc3_code::include_weapons;
   
   // Power Ups. Pointer function automatically loads power ups used in Der Riese.
   level.DLC3.powerUps =  maps\dlc3_code::include_powerups;
   
   // Adjusts how much melee damage a player with the perk will do, needs only be set once. Stock is 1000.
   level.DLC3.perk_altMeleeDamage = 1000;
   
   // Adjusts barrier search override. Stock is 400.
   level.DLC3.barrierSearchOverride = 400;
   
   // Adjusts power up drop max per round. Stock is 3.
   level.DLC3.powerUpDropMax = 3;
   
   // _loadout Variables
   level.DLC3.useCoopHeroes = true;
   
   // Bridge Feature
   level.DLC3.useBridge = false;
   
   // Hell Hounds
   level.DLC3.useHellHounds = true;
   
   // Mixed Rounds
   level.DLC3.useMixedRounds = true;
   
   // Magic Boxes -- The Script_Noteworthy Value Names On Purchase Trigger In Radiant
   boxArray = [];
   boxArray[ boxArray.size ] = "start_chest";
   boxArray[ boxArray.size ] = "chest1";
   boxArray[ boxArray.size ] = "chest2";
   boxArray[ boxArray.size ] = "chest3";
   boxArray[ boxArray.size ] = "chest4";
   boxArray[ boxArray.size ] = "chest5";
   level.DLC3.PandoraBoxes = boxArray;
   
   // Initial Zone(s) -- Zone(s) You Want Activated At Map Start
   zones = [];
   zones[ zones.size ] = "start_zone";
   level.DLC3.initialZones = zones;
   
   // Electricity Switch -- If False Map Will Start With Power On
   level.DLC3.useElectricSwitch = true;
   
   // Electric Traps
   level.DLC3.useElectricTraps = true;
   
   // _zombiemode_weapons Variables
   level.DLC3.usePandoraBoxLight = true;
   level.DLC3.useChestPulls = true;
   level.DLC3.useChestMoves = true;
   level.DLC3.useWeaponSpawn = true;
   level.DLC3.useGiveWeapon = true;
   
   // _zombiemode_spawner Varibles
   level.DLC3.riserZombiesGoToDoorsFirst = true;
   level.DLC3.riserZombiesInActiveZonesOnly = true;
   level.DLC3.assureNodes = true;
   
   // _zombiemode_perks Variables
   level.DLC3.perksNeedPowerOn = true;
   
   // _zombiemode_devgui Variables
   level.DLC3.powerSwitch = true;
   
   /*--------------------
    FUNCTION CALLS - PRE _Load
   ----------------------*/
   level thread DLC3_threadCalls();
   
   /*--------------------
    ZOMBIE MODE
   ----------------------*/
   [[level.DLC3.weapons]]();
   [[level.DLC3.powerUps]]();
   
   maps\_zombiemode::main();
   setVolFog(200, 1500, 350, 100, 0.4, 0.425, 0.44, 0.0);

   maps\_zombiemode_perks_black_ops::bo_perks_thread();
   //thread anti_cheat();
   
   /*--------------------
    FUNCTION CALLS - POST _Load
   ----------------------*/
   level.zone_manager_init_func = ::dlc3_zone_init;
   level thread DLC3_threadCalls2();
} //


If it says it couldn't find a script, get it from somewhere, making sure everything is up to date in the process, and put it in its proper place both in your mod and your raw files, tick that file and rebuild the mod. So if it says that it couldn't find the script that should be in the clientscripts folder, (I.e _dual_wield.gsc, the one you're dealing with at the moment), put it in your mods clientscript folder and raw folder in your root directory, and rebuild the mod. You must rebuild the mod, because the game only reads the files in the .iwd package, which launcher packages for you when you build the mod with "Build .iwd File" ticked.

This should work. Keep in mind that this set of steps works in any scenario where it says that it kind find a specified script, with the steps of course being tailored to that particular instance.

TL;DR If it's missing, get it from somewhere.
Title: Re: bad syntax: (file 'maps/customap1.gsc', line 9) main();
Post by: Harry Bo21 on August 12, 2016, 04:50:47 pm
its a csc not a gsc

and it wont be in raw, coz its a file from my perks ( which is actually the dual wield script from here on ugx, think make cents? or ege? i forget )

im guessing he just hasnt ticked the scripts in launcher, but i dunno, never actually used SPZ