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

Members Online

»
0 Active | 72 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

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 MP Mapping
CoD 2 mapping and level design.
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 problem
davr
General Member
Since: Apr 24, 2006
Posts: 377
Last: Aug 3, 2007
[view latest posts]
Level 5
Category: CoD2 MP Mapping
Posted: Saturday, Jul. 7, 2007 12:20 pm
First time testing my map, here is my gsc,
main() {
maps\mp\_load::main();
}

I put it in the main/maps/mp folder with the bsp and select run selected map on the compiler, It says script runtime error
(file 'maps/mp/mp_blabla.gsc', line 1)
Whats the problem here?


oh I didn't see, there is more:

called from:
(file 'maps/mp/_load.gsc', line 12)
lanterns thread lanterns();
*
called from:
(file 'maps/mp/mp_blabla.gsc', line 2)
maps\mp\_load::main();
*
started from:
(file 'maps/mp/mp_blabla.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_blabla.gsc', line 1)

edited on Jul. 7, 2007 08:22 am by davr
Share |
playername
Preferred Member
Since: Aug 24, 2006
Posts: 821
Last: Apr 15, 2011
[view latest posts]
Level 7
Forum Moderator
Im a fan of MODSonair
Category: CoD2 MP Mapping
Posted: Saturday, Jul. 7, 2007 12:39 pm
Hmmm your mp\_load file seems currupt. You are making your .gsc like this right...

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

If you are, it is something in the _load file that is messing up. Take out the line and see if you get the same error. If you don't, reinstall the game or just replace the iwd with the _load file in it. (iw_07.iwd)
nullFew tips for coding.
1. Keep the script as short as possible.
2. Don't comment every line. Only comment portions where they may be needed to point something out.
3. Don't over complicate the script, keep it organized and easy to read.

These help you find simple errors and makes it easy to make changes.
Share |
OLD_MAN_WITH_GUN
General Member
Since: May 13, 2006
Posts: 754
Last: Jan 23, 2010
[view latest posts]
Level 7
Category: CoD2 MP Mapping
Posted: Saturday, Jul. 7, 2007 12:42 pm
The problem is the lantern_lit prefab in your map.
http://www.modsonline.com/Forums-top-61634-.html%23568464
Share |
davr
General Member
Since: Apr 24, 2006
Posts: 377
Last: Aug 3, 2007
[view latest posts]
Level 5
Category: CoD2 MP Mapping
Posted: Saturday, Jul. 7, 2007 12:47 pm
ok, thx
Share |
davr
General Member
Since: Apr 24, 2006
Posts: 377
Last: Aug 3, 2007
[view latest posts]
Level 5
Category: CoD2 MP Mapping
Posted: Saturday, Jul. 7, 2007 01:01 pm
.


edited on Jul. 7, 2007 09:04 am by davr
Share |
davr
General Member
Since: Apr 24, 2006
Posts: 377
Last: Aug 3, 2007
[view latest posts]
Level 5
Category: CoD2 MP Mapping
Posted: Saturday, Jul. 7, 2007 01:18 pm
darn, its still not working, here is the fx gsc I tried is it correct?



main()
maps\mp\mp_blabla_fx::main();
maps\mp\_load::main();
{
precacheFX();
ambientFX();
level.scr_sound["flak88_explode"] = "flak88_explode";
}

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

ambientFX()
{
}











******* 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 thread lanterns();
*
called from:
(file 'maps/mp/mp_blabla.gsc', line 2)
maps\mp\_load::main();
*
started from:
(file 'maps/mp/mp_blabla.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_blabla.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 MP Mapping
Posted: Saturday, Jul. 7, 2007 01:26 pm
You don't read the linked post carefully.
The two lines
maps\mp\mp_blabla_fx::main(); and
maps\mp\_load::main();
should be in the mp_blabla.gsc and not in the mp_blabla_fx.gsc

mp_blabla.gsc
Quote:

main()
{
maps\mp\mp_blabla_fx::main();
maps\mp\_load::main();
}

mp_blabla_fx.gsc
Quote:

main()
{
precacheFX();
ambientFX();
level.scr_sound["flak88_explode"] = "flak88_explode";
}

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

ambientFX()
{
}
Share |
{GITS}Cleaner
General Member
Since: May 23, 2006
Posts: 778
Last: Apr 23, 2011
[view latest posts]
Level 7
Category: CoD2 MP Mapping
Posted: Saturday, Jul. 7, 2007 01:28 pm
Here's a copy of one of my gsc files and fx files, it might help you find your problem.

Code:

main() 
{
	maps\mp\mp_lflnchateau_fx::main();
	maps\mp\_load::main();
       	
//set background ambient noise
ambientPlay("ambient_mp_lflnchateau");<br />
<br />
	game["allies"] = "american";
	game["axis"] = "german";
	game["attackers"] = "allies";
	game["defenders"] = "axis";
	game["american_soldiertype"] = "normandy";
	game["german_soldiertype"] = "normandy";<br />
<br />

	setcvar("r_glowbloomintensity0","1");
	setcvar("r_glowbloomintensity1","1");
	setcvar("r_glowskybleedintensity0",".25");<br />
<br />
  if((getcvar("g_gametype") == "hq"))
	{
		
	level.radio = [];
		level.radio[0] = spawn("script_model", (611, 779, 84));
		level.radio[0].angles = (0, 270, 0);
		
		level.radio[1] = spawn("script_model", (-281, 159, 84));
		level.radio[1].angles = (0, 270, 0);
		
		level.radio[2] = spawn("script_model", (-2162, 107, 84));
		level.radio[2].angles = (0, 270, 0);
		
		level.radio[3] = spawn("script_model", (-1088, 1588, 236));
		level.radio[3].angles = (0, 180, 0);<br />
<br />
		level.radio[4] = spawn("script_model", (1233, 1876, 236));
		level.radio[4].angles = (0, 90, 0);
		
		level.radio[5] = spawn("script_model", (1087, 1269, 107));
		level.radio[5].angles = (0, 90, 0);<br />
<br />
		level.radio[6] = spawn("script_model", (-456, -1081, 84));
		level.radio[6].angles = (0, 90, 0);<br />
<br />
		}<br />
<br />
getent ("radio","targetname") playloopsound ("radio");
getent ("radio2","targetname") playloopsound ("radio");
getent ("dog","targetname") playloopsound ("dog");
getent ("fly","targetname") playloopsound ("fly");
getent ("fly2","targetname") playloopsound ("fly");
getent ("edith1","targetname") playloopsound ("edith1");
getent ("kubel","targetname") playloopsound ("kubel");
getent ("truck","targetname") playloopsound ("truck");<br />
<br />
}


Code:

main()
{
	precacheFX();
	ambientFX();<br />
<br />
}<br />
<br />
precacheFX()
{	
	
	level._effect["lantern_light"] 		= loadfx ("fx/props/glow_latern.efx");
	level._effect["insects_carcass_flies"]  = loadfx ("fx/misc/insects_carcass_flies.efx"); 
}<br />
<br />
ambientFX()<br />
<br />
{<br />
<br />
// Add your smoke, flies, fire effects etc... here<br />
<br />
//Flies FX
maps\mp\_fx::loopfx("insects_carcass_flies", (-41.0, -1664.0, 64.0), 0.2);
maps\mp\_fx::loopfx("insects_carcass_flies", (-1584.0, 1688.0, 72.0), 0.2);<br />
<br />

//Lanterns FX
maps\mp\_fx::loopfx("lantern_light", (-558.0, -772.0, 110.0), 0.3);<br />
<br />
}
Share |
OLD_MAN_WITH_GUN
General Member
Since: May 13, 2006
Posts: 754
Last: Jan 23, 2010
[view latest posts]
Level 7
Category: CoD2 MP Mapping
Posted: Saturday, Jul. 7, 2007 01:41 pm
@The_Preacher:
You don't need to precache the effect lantern_light in your _fx.gsc file bc. this will be already done by the _load.gsc.

the part of the _load.gsc
Quote:

lanterns()
{
if (!isdefined(level._effect["lantern_light"]))
level._effect["lantern_light"] = loadfx("fx/props/glow_latern.efx");
maps\mp\_fx::loopfx("lantern_light", self.origin, 0.3, self.origin + (0,0,1));
}
Share |
davr
General Member
Since: Apr 24, 2006
Posts: 377
Last: Aug 3, 2007
[view latest posts]
Level 5
Category: CoD2 MP Mapping
Posted: Saturday, Jul. 7, 2007 02:50 pm
That worked I think :) but it gives a new error now seems to be the same as you showed so I dont know :<



******* script compile error *******
bad syntax: (file 'maps/mp/mp_blabla_fx.gsc', line 2)
maps\mp\_load::main();
*
************************************
writing to: C:\Program Files\Activision\Call of Duty 2\servercache.dat
Error during initialization:
script compile error
(see console for details)


edited on Jul. 7, 2007 10:51 am by davr
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 MP Mapping

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

»