UGX-Mods

Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: CodingIskeyy on April 18, 2017, 08:30:45 pm

Title: Bad syntax help!
Post by: CodingIskeyy on April 18, 2017, 08:30:45 pm
I was trying to add fire fx to my map and now I have bad syntax when I compile my map. Error is on line 139.
Im pretty much a total noob when it comes to scripting btw.


Code Snippet
Plaintext
 ZOMBIE MODE
----------------------*/
[[level.DLC3.weapons]]();
[[level.DLC3.powerUps]]();
maps\ugx_weather_handle::init();

maps\_zombiemode::main();

fx_spots = getstructarray("fx_spot","targertname");

for( i = 0 ; i < fx_spots.size ; i++)
fx_spots [ i ] runfx();

model = spawn("script_model", GetPlayers()[0].origin);
model Linkto(GetPlayers()[0]);

thread maps\ugx_weather_handle::think();

/*--------------------
FUNCTION CALLS - POST _Load
----------------------*/
level.zone_manager_init_func = ::dlc3_zone_init;
level thread DLC3_threadCalls2();


runfx()
(line 139){
self.fx = PlayFx(level._effect[self.script_string], self.origin);
}


dlc3_zone_init()
{
/*
=============
///ScriptDocBegin
"Name: add_adjacent_zone( <zone_1>, <zone_2>, <flag>, <one_way> )"
"Summary: Sets up adjacent zones."
"MandatoryArg: <zone_1>: Name of first Info_Volume"
"MandatoryArg: <zone_2>: Name of second Info_Volume"
"MandatoryArg: <flag>: Flag to be set to initiate zones"
"OptionalArg: <one_way>: Make <zone_1> adjacent to <zone_2>. Defaults to false."
"Example: add_adjacent_zone( "receiver_zone", "outside_east_zone", "enter_outside_east" );"
///ScriptDocEnd
=============
*/

// Outside East Door
//add_adjacent_zone( "receiver_zone", "outside_east_zone", "enter_outside_east" );
}

preCacheMyFX()
{
// LEVEL SPECIFIC - FEEL FREE TO REMOVE/EDIT

// level._effect["snow_thick"] = LoadFx ( "env/weather/fx_snow_blizzard_intense" );
level._effect["campfire_small"] = LoadFx ( "env/fire/fx_fire_campfire_smolder" );

}
Title: Re: Bad syntax help!
Post by: codmoddd1234 on April 19, 2017, 01:19:21 am
You put the runfx function inside another function.
Paste it at the very bottom of that script.
Title: Re: Bad syntax help!
Post by: CodingIskeyy on April 19, 2017, 11:17:20 pm
So do I have to put a } before the runfx to close function above it?
Title: Re: Bad syntax help!
Post by: CodingIskeyy on April 19, 2017, 11:33:18 pm
Well that worked. Thank you so much!