Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 5 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: .GSC problems
Bob_The_Reclaimer
General Member
Since: Aug 5, 2006
Posts: 186
Last: Sep 12, 2008
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Tuesday, Mar. 13, 2007 11:48 pm
When I go to run my map (It was compiled correctly) I get an error saying that there's something wrong with the .gsc

Here it is

Code:
main()
{
maps\mp\_load::main();

	setExpFog(0.0001, 0.55, 0.6, 0.55, 0);	
	// setCullFog(0, 16500, 0.55, 0.6, 0.55, 0);
	ambientPlay("ambient_france");


	game["allies"] = "american";
	game["axis"] = "german";
 	game["american_soldiertype"] = "normandy";
	game["german_soldiertype"] = "normandy";

	setCvar("r_glowbloomintensity0", ".25");
	setCvar("r_glowbloomintensity1", ".25");
	setcvar("r_glowskybleedintensity0",".3");
}
}
Share |
codmp
General Member
Since: Feb 7, 2006
Posts: 905
Last: Aug 1, 2011
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Tuesday, Mar. 13, 2007 11:59 pm
Does it give you anything specific like the line thats messd up or something? Try running in developer mode.
Share |
Andy06r
General Member
Since: Mar 5, 2007
Posts: 12
Last: Mar 21, 2007
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Wednesday, Mar. 14, 2007 12:05 am
The two } } at the end appear to be the culprit. You only need 1.
Share |
Bob_The_Reclaimer
General Member
Since: Aug 5, 2006
Posts: 186
Last: Sep 12, 2008
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Wednesday, Mar. 14, 2007 02:54 am
Ok, I run it W/O the 2nd }, but I still get a script compile error.
Share |
bodyguard
General Member
Since: Jun 30, 2005
Posts: 442
Last: Dec 4, 2007
[view latest posts]
Level 5
Category: CoD2 Scripting
Posted: Wednesday, Mar. 14, 2007 03:37 am
mate just cut and paste this one i have made earlier..


main()
{
maps\mp\YOURMAPNAMEHERE_fx::main();
maps\mp\_load::main();

setExpFog(0.0001, 0.55, 0.6, 0.55, 0);
// setCullFog(0, 16500, 0.55, 0.6, 0.55, 0);
ambientPlay("ambient_france");

game["allies"] = "american";
game["axis"] = "german";
game["attackers"] = "allies";
game["defenders"] = "axis";
game["american_soldiertype"] = "normandy";
game["german_soldiertype"] = "normandy";

setCvar("r_glowbloomintensity0", ".25");
setCvar("r_glowbloomintensity1", ".25");
setcvar("r_glowskybleedintensity0",".3");

}


hopefully that will help mate...

make sure the name of gsc is the map name you have in arena and csv files mate

body[rocking]
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Wednesday, Mar. 14, 2007 07:30 am
Bob,
Just delete that extra brace "}" at the bottom of your quoted script! [read]

edited on Mar. 14, 2007 03:31 am by WHC_Grassy
Share |
Bob_The_Reclaimer
General Member
Since: Aug 5, 2006
Posts: 186
Last: Sep 12, 2008
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Wednesday, Mar. 14, 2007 09:11 pm
Well, here's the error I'm gettin'


Code:
******* script runtime error *******
undefined is not an array, string, or vector: (file 'maps/mp/_load.gsc', line 113)
 if (!isdefined(level._effect["lantern_light"]))
                      *
called from:
(file 'maps/mp/_load.gsc', line 12)
  lanterns[i] thread lanterns();
                     *
called from:
(file 'maps/mp/mp_shankabeta.gsc', line 3)
maps\mp\_load::main();
*
started from:
(file 'maps/mp/mp_shankabeta.gsc', line 1)
main()
*
************************************
writing to: C:\Program Files\Activision\Call of Duty 2\servercache.dat
Error during initialization:
script runtime error
(see console for details)
(file 'maps/mp/mp_shankabeta.gsc', line 1)


Share |
OLD_MAN_WITH_GUN
General Member
Since: May 13, 2006
Posts: 754
Last: Jan 23, 2010
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Wednesday, Mar. 14, 2007 10:19 pm
You used the prefab of the small lantern which need some additional scripting.
Create a second gsc file and call it mp_shankabeta_fx.gsc.
Put in the following:
Quote:
main()
{
precacheFX();
ambientFX();
level.scr_sound["flak88_explode"] = "flak88_explode";
}

precacheFX()
{
level._effect["flak_explosion"] = loadfx ("fx/explosions/flak88_explosion.efx");
}

ambientFX()
{
}
Normaly you need this for the sd gametype, but so the lantern will work too.

Add the following line to your mp_shankabeta.gsc above the line maps\mp\_load::main();
Quote:
maps\mp\mp_shankabeta_fx::main();

Share |
Bob_The_Reclaimer
General Member
Since: Aug 5, 2006
Posts: 186
Last: Sep 12, 2008
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Wednesday, Mar. 14, 2007 11:27 pm
Okay tried that, now THIS error is occuring. I'll try running it through CoD2 and not the compiler.


Code:
******* script runtime error *******
undefined is not an array, string, or vector: (file 'maps/mp/_load.gsc', line 113)
 if (!isdefined(level._effect["lantern_light"]))
                      *
called from:
(file 'maps/mp/_load.gsc', line 12)
  lanterns[i] thread lanterns();
                     *
called from:
(file 'maps/mp/mp_shankabeta.gsc', line 3)
maps\mp\_load::main();
*
started from:
(file 'maps/mp/mp_shankabeta.gsc', line 1)
main()
*
************************************
writing to: C:\Program Files\Activision\Call of Duty 2\servercache.dat
Error during initialization:
script runtime error
(see console for details)
(file 'maps/mp/mp_shankabeta.gsc', line 1)




edited on Mar. 14, 2007 07:29 pm by Bob_The_Reclaimer
Share |
Bob_The_Reclaimer
General Member
Since: Aug 5, 2006
Posts: 186
Last: Sep 12, 2008
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Wednesday, Mar. 14, 2007 11:36 pm
Ok, its'a workin
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»