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

Members Online

»
0 Active | 63 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 4
Category: CoD4 Scripting
Scripting and coding with Call of Duty 4.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Error with blackhawk
MarekFr
General Member
Since: Apr 5, 2008
Posts: 7
Last: May 11, 2009
[view latest posts]
Level 0
Category: CoD4 Scripting
Posted: Wednesday, Mar. 4, 2009 08:14 am
Hi.
I creating small SP map and i have a error when game connecting paths.

There is my *.gsc :
Code:
#include maps\_utility;

#include common_scripts\utility;

#include maps\_anim;


main()
{
	maps\_blackhawk::main( "vehicle_blackhawk" );
	maps\_load::main();
	maps\outskirts_of_dubai_anim::main();
	maps\_nightvision::main();
	level.player takeallweapons();
	level.player giveWeapon ("m203_m4_silencer_reflex");
	level.player giveWeapon ("m14_scoped_silencer");
	level.player giveWeapon ("fraggrenade");
	level.player giveWeapon ("flash_grenade");
	level.player switchToWeapon("m4m203_silencer_reflex");
	level.player giveWeapon( "c4" );
	level.player giveWeapon( "claymore" );
	level.player SetActionSlot( 2, "weapon", "c4" );
	level.player SetActionSlot( 4, "weapon", "claymore" );

	level.vaz = getEnt ( "vaz", "targetname" );
	level.vaz thread magic_bullet_shield();
	level.gri = getEnt ( "gri", "targetname" );
	level.gri thread magic_bullet_shield();
	level.snip = getEnt ( "snip", "targetname" );
	level.snip thread magic_bullet_shield();

	obj1();
	obj2();
	heli();

	level.weaponClipModels = [];
	level.weaponClipModels[0] = "weapon_dragunov_clip";
	level.weaponClipModels[1] = "weapon_ak47_clip";
	level.weaponClipModels[2] = "weapon_g3_clip";
	level.weaponClipModels[3] = "weapon_ak74u_clip";
	level.weaponClipModels[4] = "weapon_m16_clip";
	level.weaponClipModels[5] = "weapon_saw_clip";

	array_thread( getEntArray( "arabians", "script_noteworthy" ), ::add_spawn_function );
}

obj1()
{

obj1 = getent("obj1", "targetname");

objective_add(1, "active", &"outskirts_of_dubai_OBJ1",getent("obj1","targetname").origin);

objective_current(1);

obj1 waittill("trigger");

objective_state(1, "done");

obj1 delete();

}

obj2()

{

obj2 = getent("obj2", "targetname");

objective_add(2, "active", &"outskirts_of_dubai_OBJ2",getent("obj2","targetname").origin);

objective_current(2);

obj2 waittill("death");

objective_state(2, "done");

}


heli()
{
	thread maps\_vehicle::create_vehicle_from_spawngroup_and_gopath( 14 );

}



*Sorry for my bad english, I'm from Czech republic

edited on Mar. 4, 2009 03:15 am by MarekFr
Share |
babycop
General Member
Since: Feb 18, 2006
Posts: 488
Last: Feb 27, 2010
[view latest posts]
Level 5
Category: CoD4 Scripting
Posted: Wednesday, Mar. 4, 2009 10:37 pm
it happened to me too. The only way I found to fix this is to take out your blackhawk vehicle from the map and then compile your paths. Only then do you put it back and compile the map again, but without paths.
Share |
techno2sl
General Member
Since: Aug 5, 2004
Posts: 2977
Last: Oct 14, 2010
[view latest posts]
Level 9
Category: CoD4 Scripting
Posted: Thursday, Mar. 5, 2009 12:02 am
Did you convert all vehicle assets?

Vehicles

Check the "errors bit" [thumbs_up]

Share |
MarekFr
General Member
Since: Apr 5, 2008
Posts: 7
Last: May 11, 2009
[view latest posts]
Level 0
Category: CoD4 Scripting
Posted: Thursday, Mar. 5, 2009 11:00 am
Thanks, techno2sl, but now I don´t see my M4A1 Sopmod. I see only Red dot sight, grenade in M203 and lasersight but don't a M4A1 and M203 model. When i building the fast file, I have a error "Couldn't find material ´mtl_weapon_m4_m16´.

Share |
MarekFr
General Member
Since: Apr 5, 2008
Posts: 7
Last: May 11, 2009
[view latest posts]
Level 0
Category: CoD4 Scripting
Posted: Thursday, Mar. 5, 2009 12:47 pm
There is a screenshot:
Share |
techno2sl
General Member
Since: Aug 5, 2004
Posts: 2977
Last: Oct 14, 2010
[view latest posts]
Level 9
Category: CoD4 Scripting
Posted: Thursday, Mar. 5, 2009 01:02 pm
I swear I saw this error recently and someone had to extract the M16 weapon files from the mod tools download again every time they convert certain assets. Try it, hopefully it will work, and then hopefully oyu'll never have to convert vehicle assets again.
Share |
MarekFr
General Member
Since: Apr 5, 2008
Posts: 7
Last: May 11, 2009
[view latest posts]
Level 0
Category: CoD4 Scripting
Posted: Thursday, Mar. 5, 2009 01:36 pm
Thanks, it works good, but when i shoot to helicopter, it blow-up but helicopter rotate on the air instead of falling to ground adn game show this error:

Console(only errors):
Code:

******* script runtime error *******
undefined is not a field object: (file 'maps/_vehicle.gsc', line 2094)
 crashLoc.claimed = true; 
 *
Error: called from:
(file 'maps/_vehicle.gsc', line 2041)
 self thread helicopter_crash_move();
             *
Error: called from:
(file 'maps/_vehicle.gsc', line 1948)
   self thread helicopter_crash( attacker );
               *
Error: started from:
(file 'maps/_vehicle.gsc', line 1813)
   self waittill( "death", attacker );
        *
Error: ************************************
      dvar set com_errorTitle Error
      dvar set com_errorMessage script runtime error
(see console for details)
undefined is not a field object
Could not find menu 'main'

******* script runtime error *******
undefined is not a field object: (file 'maps/_vehicle.gsc', line 2104)
 self setvehgoalpos( ( crashLoc.origin[ 0 ], crashLoc.origin[ 1 ], self.origin[ 2 ] ), 1 ); 
                                             *
Error: called from:
(file 'maps/_vehicle.gsc', line 2041)
 self thread helicopter_crash_move();
             *
Error: called from:
(file 'maps/_vehicle.gsc', line 1948)
   self thread helicopter_crash( attacker );
               *
Error: started from:
(file 'maps/_vehicle.gsc', line 1813)
   self waittill( "death", attacker );
        *
Error: ************************************
      dvar set com_errorTitle Error
      dvar set com_errorMessage script runtime error
(see console for details)
undefined is not a field object
Could not find menu 'main'

******* script runtime error *******
undefined is not an array, string, or vector: (file 'maps/_vehicle.gsc', line 2104)
 self setvehgoalpos( ( crashLoc.origin[ 0 ], crashLoc.origin[ 1 ], self.origin[ 2 ] ), 1 ); 
                                                      *
Error: called from:
(file 'maps/_vehicle.gsc', line 2041)
 self thread helicopter_crash_move();
             *
Error: called from:
(file 'maps/_vehicle.gsc', line 1948)
   self thread helicopter_crash( attacker );
               *
Error: started from:
(file 'maps/_vehicle.gsc', line 1813)
   self waittill( "death", attacker );
        *
Error: ************************************
      dvar set com_errorTitle Error
      dvar set com_errorMessage script runtime error
(see console for details)
undefined is not an array, string, or vector
Could not find menu 'main'

******* script runtime error *******
undefined is not a field object: (file 'maps/_vehicle.gsc', line 2104)
 self setvehgoalpos( ( crashLoc.origin[ 0 ], crashLoc.origin[ 1 ], self.origin[ 2 ] ), 1 ); 
                       *
Error: called from:
(file 'maps/_vehicle.gsc', line 2041)
 self thread helicopter_crash_move();
             *
Error: called from:
(file 'maps/_vehicle.gsc', line 1948)
   self thread helicopter_crash( attacker );
               *
Error: started from:
(file 'maps/_vehicle.gsc', line 1813)
   self waittill( "death", attacker );
        *
Error: ************************************
      dvar set com_errorTitle Error
      dvar set com_errorMessage script runtime error
(see console for details)
undefined is not a field object
Could not find menu 'main'

******* script runtime error *******
undefined is not an array, string, or vector: (file 'maps/_vehicle.gsc', line 2104)
 self setvehgoalpos( ( crashLoc.origin[ 0 ], crashLoc.origin[ 1 ], self.origin[ 2 ] ), 1 ); 
                                *
Error: called from:
(file 'maps/_vehicle.gsc', line 2041)
 self thread helicopter_crash_move();
             *
Error: called from:
(file 'maps/_vehicle.gsc', line 1948)
   self thread helicopter_crash( attacker );
               *
Error: started from:
(file 'maps/_vehicle.gsc', line 1813)
   self waittill( "death", attacker );
        *
Error: ************************************
      dvar set com_errorTitle Error
      dvar set com_errorMessage script runtime error
(see console for details)
undefined is not an array, string, or vector
Could not find menu 'main'

******* script runtime error *******
type undefined is not a float: (file 'maps/_vehicle.gsc', line 2104)
 self setvehgoalpos( ( crashLoc.origin[ 0 ], crashLoc.origin[ 1 ], self.origin[ 2 ] ), 1 ); 
                                      *
Error: called from:
(file 'maps/_vehicle.gsc', line 2041)
 self thread helicopter_crash_move();
             *
Error: called from:
(file 'maps/_vehicle.gsc', line 1948)
   self thread helicopter_crash( attacker );
               *
Error: started from:
(file 'maps/_vehicle.gsc', line 1813)
   self waittill( "death", attacker );
        *
Error: ************************************
      dvar set com_errorTitle Error
      dvar set com_errorMessage script runtime error
(see console for details)
type undefined is not a float
Could not find menu 'main'

******* script runtime error *******
type undefined is not a vector: (file 'maps/_vehicle.gsc', line 2104)
 self setvehgoalpos( ( crashLoc.origin[ 0 ], crashLoc.origin[ 1 ], self.origin[ 2 ] ), 1 ); 
                     *
Error: called from:
(file 'maps/_vehicle.gsc', line 2041)
 self thread helicopter_crash_move();
             *
Error: called from:
(file 'maps/_vehicle.gsc', line 1948)
   self thread helicopter_crash( attacker );
               *
Error: started from:
(file 'maps/_vehicle.gsc', line 1813)
   self waittill( "death", attacker );
        *
Error: ************************************
      dvar set com_errorTitle Error
      dvar set com_errorMessage script runtime error
(see console for details)
type undefined is not a vector
Could not find menu 'main'
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 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

»