Author |
Topic: Truly weird and annoying problem |
LolMeister |
General Member Since: Apr 30, 2009 Posts: 7 Last: Jul 10, 2009 [view latest posts] |
|
|
Category: CoD2 Scripting Posted: Thursday, Apr. 30, 2009 11: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 |
|
|
|
LolMeister |
General Member Since: Apr 30, 2009 Posts: 7 Last: Jul 10, 2009 [view latest posts] |
|
|
|
ChusGMh |
General Member Since: Oct 7, 2008 Posts: 65 Last: Oct 4, 2010 [view latest posts] |
|
|
|
LolMeister |
General Member Since: Apr 30, 2009 Posts: 7 Last: Jul 10, 2009 [view latest posts] |
|
|
Category: CoD2 Scripting Posted: Thursday, Apr. 30, 2009 01:25 pm |
|
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");
}
} |
|
|
|
Pedro699 |
General Member Since: Jun 19, 2006 Posts: 781 Last: Dec 18, 2010 [view latest posts] |
|
|
Category: CoD2 Scripting Posted: Thursday, Apr. 30, 2009 01:41 pm |
|
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.
|
|
|
|
LolMeister |
General Member Since: Apr 30, 2009 Posts: 7 Last: Jul 10, 2009 [view latest posts] |
|
|
Category: CoD2 Scripting Posted: Thursday, Apr. 30, 2009 08: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? |
|
|
|
DemonSeed |
General Member Since: Apr 30, 2009 Posts: 1362 Last: Feb 19, 2018 [view latest posts] |
|
|
|
Category: CoD2 Scripting Posted: Thursday, Apr. 30, 2009 08: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? |
|
|
|
LolMeister |
General Member Since: Apr 30, 2009 Posts: 7 Last: Jul 10, 2009 [view latest posts] |
|
|
|
DemonSeed |
General Member Since: Apr 30, 2009 Posts: 1362 Last: Feb 19, 2018 [view latest posts] |
|
|
|
|