Author |
Topic: script runtime error (undefined is not an array, string, or vector:)?? |
47thSlaughterdem |
General Member Since: May 2, 2006 Posts: 42 Last: Jul 2, 2006 [view latest posts] |
|
|
Category: CoD2 MP Mapping Posted: Thursday, May. 4, 2006 02:23 am |
|
I made a map with three houses and a wall barrier surrounding the map.
I added 1 DM spawn point
I added a bunch of lights
compiled the map
made my gsc with the following info inside
main() {
maps\mp\_load::main();
}
and when i try and run my map I get this error
I am thinking there must be a lantern inside one of the houses.
And I am probably missing one of the specific effect commands?
any help or guidence would be appreciated
Quote: ******* 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_houses22.gsc', line 2)
maps\mp\_load::main();
*
started from:
(file 'maps/mp/mp_houses22.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_houses22.gsc', line 1)
|
|
|
|
veef |
General Member Since: Apr 25, 2006 Posts: 1258 Last: Aug 29, 2006 [view latest posts] |
|
|
Category: CoD2 MP Mapping Posted: Thursday, May. 4, 2006 05:11 am |
|
47thSlaughterdem writes...Quote: Im running it straight from the compiler
then yes you are in devmode, do not use the compiler to start your map. Start your cod2 like normal bring down the console and type "/map yourmapname" |
|
|
|
47thSlaughterdem |
General Member Since: May 2, 2006 Posts: 42 Last: Jul 2, 2006 [view latest posts] |
|
|
|
veef |
General Member Since: Apr 25, 2006 Posts: 1258 Last: Aug 29, 2006 [view latest posts] |
|
|
|
47thSlaughterdem |
General Member Since: May 2, 2006 Posts: 42 Last: Jul 2, 2006 [view latest posts] |
|
|
|
47thSlaughterdem |
General Member Since: May 2, 2006 Posts: 42 Last: Jul 2, 2006 [view latest posts] |
|
|
|
veef |
General Member Since: Apr 25, 2006 Posts: 1258 Last: Aug 29, 2006 [view latest posts] |
|
|
Category: CoD2 MP Mapping Posted: Thursday, May. 4, 2006 07:12 am |
|
47thSlaughterdem writes...Quote: but when I am making the map I add a building and test it after i compile it i dont want to go through all the hassles of making a mp_mapname.iwd
everrytime i save it
You don't have to create the .iwd just turn off pure in your server settings, then you can run your map like normal and with the lanterns etc.. but if you run in devmode you will get that error. |
|
|
|
veef |
General Member Since: Apr 25, 2006 Posts: 1258 Last: Aug 29, 2006 [view latest posts] |
|
|
|
Drakonin |
General Member Since: May 1, 2006 Posts: 22 Last: Jan 23, 2008 [view latest posts] |
|
|
Category: CoD2 MP Mapping Posted: Monday, May. 8, 2006 03:21 am |
|
veef writes...Quote: Or call me crazy but you could actually define the lantern effects in your fx.gsc
How would you do that? |
|
|
|
veef |
General Member Since: Apr 25, 2006 Posts: 1258 Last: Aug 29, 2006 [view latest posts] |
|
|
Category: CoD2 MP Mapping Posted: Monday, May. 8, 2006 05:54 am |
|
Drakonin writes...Quote: veef writes...Quote: Or call me crazy but you could actually define the lantern effects in your fx.gsc
How would you do that?
add this in the precache of your fx .gsc Code: level._effect["lantern_light"] = loadfx("fx/props/glow_latern.efx");
Sample mp_yourmapname_fx.gsc
Code: main()
{
precacheFX();
ambientFX();
level.scr_sound["flak88_explode"] = "flak88_explode"; // needed for sd gametype
}
precacheFX()
{
level._effect["flak_explosion"] = loadfx ("fx/explosions/flak88_explosion.efx"); // needed for sd gametype
level._effect["lantern_light"] = loadfx("fx/props/glow_latern.efx");
}
ambientFX()
{
// add your smoke, dust effects etc... here
} |
|
|
|