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

Members Online

»
0 Active | 69 Guests
Online:

LATEST FORUM THREADS

»
Mohaa maps on Cod2?
CoD2 MP 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 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 subscribe
Author Topic: Truly weird and annoying problem
LolMeister
General Member
Since: Apr 30, 2009
Posts: 7
Last: Jul 10, 2009
[view latest posts]
Level 0
Category: CoD2 Scripting
Posted: Thursday, Apr. 30, 2009 04:24 am
Good afternoon ModsOnline.

I'm trying to make a moving higgins boat for my MP map, and when i were trying to test it i came across a really disturbing problem.

This is the error message i'm getting, as taken from the console.


Code:
Menu load error: ui_mp/settings_hq.menu, line 79: Attempting to change type from 0 to 9.
Move the type definition higher up in the itemDef.

Menu load error: ui_mp/settings_hq.menu, line 80: Attempting to change type from 0 to 9.
Move the type definition higher up in the itemDef.

Menu load error: ui_mp/settings_hq.menu, line 101: Attempting to change type from 0 to 9.
Move the type definition higher up in the itemDef.

Menu load error: ui_mp/settings_hq.menu, line 102: Attempting to change type from 0 to 9.
Move the type definition higher up in the itemDef.

	Loading 'ui_mp/settings_sd.menu'...
	Loading 'ui_mp/settings_sw.menu'...
	Loading 'ui_mp/background.menu'...
WARNING: Could not find 'maps/mp/mp_boat.csv'.
	Loading 'ui_mp/ingame.menu'...
	Loading 'ui_mp/ingame_controls.menu'...
	Loading 'ui_mp/ingame_options.menu'...
	Loading 'ui_mp/ingame_system.menu'...
	Loading 'ui_mp/ingame_leave.menu'...
	Loading 'ui_mp/ingame_callvote.menu'...
	Loading 'ui_mp/wm_quickmessage.menu'...
------- Game Initialization -------
gamename: Call of Duty 2
gamedate: Oct  6 2005
----------------------
Game: G_SetupWeaponDef
----------------------
-----------------------------------

******* script runtime error *******
undefined is not an object: (file 'maps/mp/boat.gsc', line 12)
trig waittill ("trigger");
*
called from:
(file 'maps/mp/boat.gsc', line 3)
thread boat ();
       *
called from:
(file 'maps/mp/mp_boat.gsc', line 3)
maps\mp\boat::main();
*
started from:
(file 'maps/mp/mp_boat.gsc', line 1)
main()
*
************************************
writing to: C:\Program\Activision\Call of Duty 2\servercache.dat
Error during initialization:
script runtime error
(see console for details)
(file 'maps/mp/mp_boat.gsc', line 1)




And then, this is my main script.

Code:
main() { maps\mp\boat::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");  }


And at last, this is my boat script

Code:
main() { thread boat (); }  boat () { hig = getent ("Higgins","targetname"); trig = getent ("higginstrigger","targetname"); while (1) { trig waittill ("trigger"); hig movex (300, 2, 0, 0.5); hig waittill ("movedone"); wait (4); hig movex (-300, 2, 0, 0.5); hig waittill ("movedone"); } }


I hope you guys could help a poor fella like myself out, thank you.

edited on Apr. 30, 2009 07:24 am by LolMeister
Share |
LolMeister
General Member
Since: Apr 30, 2009
Posts: 7
Last: Jul 10, 2009
[view latest posts]
Level 0
Category: CoD2 Scripting
Posted: Thursday, Apr. 30, 2009 04:57 am
Anyone? [ohwell]

edited on Apr. 30, 2009 07:57 am by LolMeister
Share |
ChusGMh
General Member
Since: Oct 7, 2008
Posts: 65
Last: Oct 4, 2010
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Thursday, Apr. 30, 2009 06:16 am
plz give me ur script , not in one line i cant see what 's bad or if u place all the { }... give me it good
Share |
LolMeister
General Member
Since: Apr 30, 2009
Posts: 7
Last: Jul 10, 2009
[view latest posts]
Level 0
Category: CoD2 Scripting
Posted: Thursday, Apr. 30, 2009 06:25 am
arthasisgod writes...
Quote:
plz give me ur script , not in one line i cant see what 's bad or if u place all the { }... give me it good


Code:
main()
{
maps\mp\boat::main();
maps\mp\_load::main();<br />
<br />
setExpFog(0.0001, 0.55, 0.6, 0.55, 0);
// setCullFog(0, 16500, 0.55, 0.6, 0.55, 0);
ambientPlay("ambient_france");<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", ".25");
setCvar("r_glowbloomintensity1", ".25");
setcvar("r_glowskybleedintensity0",".3");<br />
<br />
}


Code:
main()
{
thread boat ();
}<br />
<br />
boat ()
{
hig = getent ("Higgins","targetname");
trig = getent ("higginstrigger","targetname");
while (1)
{
trig waittill ("trigger");
hig movex (300, 2, 0, 0.5);
hig waittill ("movedone");
wait (4);
hig movex (-300, 2, 0, 0.5);
hig waittill ("movedone");
}
}
Share |
Pedro699
General Member
Since: Jun 19, 2006
Posts: 781
Last: Dec 18, 2010
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Thursday, Apr. 30, 2009 06:41 am
Have a think about what the error says:

Quote:
undefined is not an object: (file 'maps/mp/boat.gsc', line 12)
trig waittill ("trigger");


Now, waittill is a built in function and "trigger" is a string, so the only undefined thing on that line is trig.

Now, from further up you have

Quote:
trig = getent ("higginstrigger","targetname");


This should get the entity and assign it to trig. However trig is still undefined. This means there is no element in your map with a 'targetname' of 'higginstrigger' so recheck your map contents.

You also have a space between getent and the ( which I'd get rid of.
Share |
LolMeister
General Member
Since: Apr 30, 2009
Posts: 7
Last: Jul 10, 2009
[view latest posts]
Level 0
Category: CoD2 Scripting
Posted: Thursday, Apr. 30, 2009 01:29 pm
Pedro699 writes...
Quote:
Have a think about what the error says:

Quote:
undefined is not an object: (file 'maps/mp/boat.gsc', line 12)
trig waittill ("trigger");


Now, waittill is a built in function and "trigger" is a string, so the only undefined thing on that line is trig.

Now, from further up you have

Quote:
trig = getent ("higginstrigger","targetname");


This should get the entity and assign it to trig. However trig is still undefined. This means there is no element in your map with a 'targetname' of 'higginstrigger' so recheck your map contents.

You also have a space between getent and the ( which I'd get rid of.


Thanks alot! It's working now... almost.

I can enter the map now and everything's fine, until i press the trigger. I get a error message about line 12 in my boat script which is:

Code:
trig waittill ("trigger");


Do you know what's wrong?
Share |
DemonSeed
General Member
Since: Apr 30, 2009
Posts: 1362
Last: Feb 19, 2018
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Thursday, Apr. 30, 2009 01:59 pm
Quote:
I can enter the map now and everything's fine, until i press the trigger.


Are you using a trigger_use? If not, you cant "press" the trigger - trigger_radius or trigger_multiple type triggers would have to detect you (the player) automatically as soon as you are in their range.

What exactly is the error? Is "trig" still undefined? Or is it something else now?
Share |
LolMeister
General Member
Since: Apr 30, 2009
Posts: 7
Last: Jul 10, 2009
[view latest posts]
Level 0
Category: CoD2 Scripting
Posted: Thursday, Apr. 30, 2009 02:11 pm
It's a script runtime error, it tells me to check my console but i don't know how to do that either.

Yes, it's a trigger_use.
Share |
DemonSeed
General Member
Since: Apr 30, 2009
Posts: 1362
Last: Feb 19, 2018
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Thursday, Apr. 30, 2009 02:18 pm
In your server config file, enable console logging:

set logfile 1

Run your map again, and hit the error again.

Now, go to where your map is located in the game (either the 'main' folder, or the fs_game folder if you're using one) and look for a file named console_mp.log. Open it with something like WordPad and then press 'F' to bring up the search box. Type in "runtime" (without the speech marks) and press ENTER.

This will locate the error, and it will tell you exactly what the error is, and what line number it is at (if you intend to do a lot of modding, I would recommend you use a free programme like programmers notpad [google for it] and open your .GSC files with that as it has line numbers).
Share |
Restricted Access Topic is Locked 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

»