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

Members Online

»
0 Active | 56 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 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
Page
Next Page
subscribe
Author Topic: cod2 crashes when load up scripts
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2726
Last: Nov 15, 2020
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Wednesday, Aug. 4, 2010 01:16 pm
right i have tried loading up loads of scripts then all work fine.. except for 2. the scripts themselfs seem fine, but when load up the map cod2 crashes and i have to reset.

anyway
here the #1 of the scripts that dont work:
Code:
main()
{
thread secretPassage();
}

secretPassage()
{
	trigopen = getent( "trigopen","targetname" );
        trigclose = getent( "trigclose","targetname" );
        wall = getent( "secretwall","targetname" );

	
	for( ;; )
	{
		trigopen waittill( "trigger", player );
		
		if(player.name == "^^44|^^11UK^^44|^^11Dj_Aj")
		{
			wall notsolid();
                        trigclose waittill( "trigger" );
                        wall solid();
		}
		else
		{
			iprintlnbold("^1Incorrect Name");
		}
	}
}


heres my 2nd code that doesnt work:
Code:
main()
{
thread giveAmmo();
}

giveAmmo()
{
	trig = getent( "trig_ammo","targetname" );
	
	for( ;; )
	{
		trig waittill( "trigger", player );
		
		if( isPlayer( player ) && player isTouching( trig ) && isAlive( player ) && player.pers["team"] == "allies")
		{
			firstSlot = player getweaponslotweapon("primary");
			secondSlot = player getweaponslotweapon("primaryb");
					
			player GiveMaxAmmo( firstSlot );
			player GiveMaxAmmo( secondSlot );
		}
		else
		{
			// Axis won't recieve any ammo
			// Could add messages here?
		}
	}
}



any my .gsc (i know it works because it loads up maps without loading up them two scripts.

Code:
main()
{

	maps\mp\_load::main();
	maps\mp\trapdoor::main();
	maps\mp\traindoor_r::main();
	maps\mp\traindoor_l::main();
	maps\mp\movingthetrucks::main();
	maps\mp\secret::main();
	maps\mp\ammo::main();
	
	game["allies"] = "british";
	game["axis"] = "german";
	game["attackers"] = "allies";
	game["defenders"] = "axis";
	game["british_soldiertype"] = "normandy";
	game["german_soldiertype"] = "normandy";

	setcvar("r_glowbloomintensity0",".25");
	setcvar("r_glowbloomintensity1",".25");
	setcvar("r_glowskybleedintensity0",".3");
	setcvar("r_gamma","1");

}


BTW for those of you think "mabey its just one script that dont work because your loading up "ammo" aswell that will make it crash" i tried it without it, still get the error, help please!!

Thanks, Ukdjaj[thumbs_up]
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2726
Last: Nov 15, 2020
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Wednesday, Aug. 4, 2010 01:22 pm
when i say dont work i mean it crashes the game not the scripts that dont work.
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: Wednesday, Aug. 4, 2010 01:46 pm
If its not the scripts, then this thread should not be in the scripting forums.

Just my thoughts as an over-eger moderator/admin on other sites.
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2726
Last: Nov 15, 2020
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Wednesday, Aug. 4, 2010 02:07 pm
anything that can actually help?
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: Wednesday, Aug. 4, 2010 02:09 pm
ukdjaj writes...
Quote:
anything that can actually help?


Erm, how about this: Do you recieve either a script runtime or script compile error?

edited on Aug. 4, 2010 10:48 am by DemonSeed
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2726
Last: Nov 15, 2020
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Wednesday, Aug. 4, 2010 02:49 pm
no when i type in "map mp_map" the screen comes up like it is loading but nothing happens. then you have to reset the computer.
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: Wednesday, Aug. 4, 2010 03:00 pm
ukdjaj writes...
Quote:
no when i type in "map mp_map" the screen comes up like it is loading but nothing happens. then you have to reset the computer.


Right, hence my original point - this thread should not be in the scripting forums if scripting is not the cause of the problem.

The actual answer to your problem is the iwd checksum issue. You are boardering on the verge of having too many custom IWD files in your 'main' folder. Reduce them to less than 4 and you should be good to go.
Share |
tHMatt
General Member
Since: Sep 11, 2007
Posts: 473
Last: Mar 20, 2013
[view latest posts]
Level 5
Category: CoD2 Scripting
Posted: Wednesday, Aug. 4, 2010 04:35 pm
DemonSeed writes...
Quote:
ukdjaj writes...
Quote:
no when i type in "map mp_map" the screen comes up like it is loading but nothing happens. then you have to reset the computer.


Right, hence my original point - this thread should not be in the scripting forums if scripting is not the cause of the problem.

The actual answer to your problem is the iwd checksum issue. You are boardering on the verge of having too many custom IWD files in your 'main' folder. Reduce them to less than 4 and you should be good to go.


scripts can sometimes cause the game to shutdown/freeze rather then spit our an error, I know this for a fact as I have been through it many times.

though this situtation is pretty easy to debug DJ, just use your head.
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2726
Last: Nov 15, 2020
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Wednesday, Aug. 4, 2010 05:10 pm
i tried using it its not very good =S

but the thing is them scripts work for other people, and before i reformatted my computer the "ammo" script worked aswell. and its only them 2 scripts that do it.. i tried moving it do new .gsc coping .gsc's that i know work.. everything.

can you tell me please??
Share |
liltc64
General Member
Since: Feb 12, 2007
Posts: 906
Last: Oct 22, 2012
[view latest posts]
Level 7
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Wednesday, Aug. 4, 2010 07:32 pm
yeah does happend threw scripts the other day i tryed checking a button with useing onOpen but on a button and it just crashed my cod2 every time i went to test so that gave me the hint that, that wont work lol.
Share |
Restricted Access Topic is Locked
Page
Next Page
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

»