script run time error?

Have questions about CoD4 mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
Reality
CJ Newbie
CJ Newbie
Posts: 51
Joined: May 3rd, 2011, 9:57 pm

script run time error?

Post by Reality » July 3rd, 2011, 6:13 pm

I cant load my map, heres my .GSC

Code: Select all

main()
{
	//maps\mp\mp_explicit_fx::main();
	//maps\createart\mp_explicit_art::main();
	maps\mp\_load::main();	
	maps\mp\_teleport::main();

	//maps\mp\_compass::setupMiniMap("compass_map_mp_backlot");

	//setExpFog(500, 2200, 0.81, 0.75, 0.63, 0);
	//VisionSetNaked( "mp_explicit" );
	ambientPlay("ambient_explicit_ext");

	game["allies"] = "marines";
	game["axis"] = "opfor";
	game["attackers"] = "axis";
	game["defenders"] = "allies";
	game["allies_soldiertype"] = "desert";
	game["axis_soldiertype"] = "desert";

	setdvar( "r_specularcolorscale", "1" );

	setdvar("r_glowbloomintensity0",".25");
	setdvar("r_glowbloomintensity1",".25");
	setdvar("r_glowskybleedintensity0",".3");
	setdvar("compassmaxrange","1800");
	
	thread printer1();
	thread printer2();
	thread printer3();
	thread printer4();
	thread printer5();


}

//xfire = madstealth
printer1()
{
trigger = GetEnt( "square1", "targetname" );
while (1)
	{
	trigger waittill("trigger", user);
		{
		iprintlnbold( "ROTANT is a GOD");
		wait 4;
		}
	}
}
printer2()
{
trigger = GetEnt( "square2", "targetname" );
while (1)
	{
	trigger waittill("trigger", user);
		{
		iprintlnbold( "pr!m3 kicks ass!");
		wait 4;
		}
	}
}
printer3()
{
trigger = GetEnt( "square3", "targetname" );
while (1)
	{
	trigger waittill("trigger", user);
		{
		iprintlnbold( "Explicit Bouncers - Best Bouncers Around!");
		wait 4;
		}
	}
}
printer4()
{
trigger = GetEnt( "square4", "targetname" );
while (1)
	{
	trigger waittill("trigger", user);
		{
		iprintlnbold( "LOL @ U");
		wait 4;
		}
	}
}
printer5()
{
trigger = GetEnt( "square5", "targetname" );
while (1)
	{
	trigger waittill("trigger", user);
		{
		iprintlnbold( "I haz guns");
		wait 4;
		}
	}
}
the console says its something to do with this line..

Code: Select all

trigger waittill("trigger", user);
help????????

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13315
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: script run time error?

Post by Drofder2004 » July 4th, 2011, 8:59 am

Firstly: Use

Code: Select all

 instead of [code]
Secondly: Copy down the entire error and post it here.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

F |Madness| U
CJ G0D!
CJ G0D!
Posts: 1575
Joined: June 3rd, 2009, 9:02 pm
Location: Cardiff University, UK

Re: script run time error?

Post by F |Madness| U » July 4th, 2011, 10:49 am

Not sure but do you have to rename the triggers? Ie. trigger1 for square1, trigger2 for square2. Also try running the map with developer and debug script on.
-

IzNoGoD
CJ Worshipper
CJ Worshipper
Posts: 343
Joined: January 6th, 2009, 8:39 pm
Location: Netherlands/Holland

Re: script run time error?

Post by IzNoGoD » July 4th, 2011, 11:44 am

No need for the {} after the waittill.
Try removing them in every thread.
LMGTFY!

Its not a glitch... Its the future!

User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

Re: script run time error?

Post by waywaaaard » July 6th, 2011, 1:22 pm

@IzNoGod

they shouldn't matter -> they just define a block
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13315
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: script run time error?

Post by Drofder2004 » July 7th, 2011, 7:20 pm

waywaaaard wrote:@IzNoGod

they shouldn't matter -> they just define a block
True, but it is messy coding like that imo :P

But, until an error is given to us, this is a dead situation (unless some one is willing to recreate the code).
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

F |Madness| U
CJ G0D!
CJ G0D!
Posts: 1575
Joined: June 3rd, 2009, 9:02 pm
Location: Cardiff University, UK

Re: script run time error?

Post by F |Madness| U » July 7th, 2011, 9:08 pm

Drofder2004 wrote: But, until an error is given to us, this is a dead situation (unless some one is willing to recreate the code).
Don't see why anyone should go out of their way to provide help, when the OP isn't prepared to do something so simple to help us help him. (And also what kind of scripter doesn't use developer commands to check errors.. I did that on my first day of scripting).
-

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest