Page 1 of 1

script run time error?

Posted: July 3rd, 2011, 6:13 pm
by Reality
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????????

Re: script run time error?

Posted: July 4th, 2011, 8:59 am
by Drofder2004
Firstly: Use

Code: Select all

 instead of [code]
Secondly: Copy down the entire error and post it here.

Re: script run time error?

Posted: July 4th, 2011, 10:49 am
by F |Madness| U
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.

Re: script run time error?

Posted: July 4th, 2011, 11:44 am
by IzNoGoD
No need for the {} after the waittill.
Try removing them in every thread.

Re: script run time error?

Posted: July 6th, 2011, 1:22 pm
by waywaaaard
@IzNoGod

they shouldn't matter -> they just define a block

Re: script run time error?

Posted: July 7th, 2011, 7:20 pm
by Drofder2004
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).

Re: script run time error?

Posted: July 7th, 2011, 9:08 pm
by F |Madness| U
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).