script compile error.

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

Moderator: Core Staff

Post Reply
zipperdude
CJ Worshipper
CJ Worshipper
Posts: 386
Joined: July 12th, 2007, 6:07 pm

script compile error.

Post by zipperdude » November 1st, 2008, 9:58 am

I launch my map, and it tells me in develepor "unexpected end of file line 30"
I cant figure out what this means. Here is my code please take a lok at it:

Code: Select all

main()
{
	thread barrel();
}
barrel()
{
	trig = getent("barrel_trigger","targetname");
	block = getent ("barrel","targetname");
	so = getent ("barrel_so","targetname");
	ex = getent("barrel_go","targetname");

	boom_s = loadfx("sound/Explosions/Explo_metal01.wav");
	boom = loadfx("fx/explosion/flakkcannon_exploder.efx");
	while (1)
	{
	trig waittill("trigger");
	{
		playfx(boom, so.origin);
		playsound(boom_s, ex.origin);
		block moveZ (400, 1, 0, 1);
		block waittill ("movedone");
		wait 0.05;
		block moveZ (-400, 1, 1, 0);
		block waittill ("movedone");
		block movez (8, .05, 0, 0);
		block waittill ("movedone");
		block movez (-8, .05, 0, 0);
		block waittill ("movedone");
	}
}

I also think i did the "boom_s = loadfx("sound/Explosions/Explo_metal01.wav");" wrong too ifso please let me know how i have no idea. Ive looked at nm_train and still cant figure it out :P
Show me what lies just beyond my eyes
Would you take me to the world where my spirit flies?
Tell me is that really fact or a pack of lies?

Twiztid = By . Blink = Song.
[color=#00FF00]Drofder2004[/color] wrote:Its not out of nowhere, I carry it in my backpack, with my elephant, 32 pets, a spare pair of leggings, 20 fish feasts, a staff I use to magically disenchant things, a stone I can use to travel home, 20000 arrows, a portable stable with a gorilla, a cat and a wolf, 20 bandages and massive quantity of cloth.

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Re: script compile error.

Post by Nightmare » November 1st, 2008, 8:11 pm

Code: Select all

main()
{
   thread barrel();
}
barrel()
{
   trig = getent("barrel_trigger","targetname");
   block = getent ("barrel","targetname");
   so = getent ("barrel_so","targetname");
   ex = getent("barrel_go","targetname");

   boom_s = loadfx("sound/Explosions/Explo_metal01.wav");
   boom = loadfx("fx/explosion/flakkcannon_exploder.efx");
   while (1)
   {
   trig waittill("trigger");
   {
      playfx(boom, so.origin);
      playsound(boom_s, ex.origin);
      block moveZ (400, 1, 0, 1);
      block waittill ("movedone");
      wait 0.05;
      block moveZ (-400, 1, 1, 0);
      block waittill ("movedone");
      block movez (8, .05, 0, 0);
      block waittill ("movedone");
      block movez (-8, .05, 0, 0);
      block waittill ("movedone");
   }
   }
}
Don't forget to make sure you have an equal amount of { as }.
Also: I hope you will be changing those targetnames.
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

zipperdude
CJ Worshipper
CJ Worshipper
Posts: 386
Joined: July 12th, 2007, 6:07 pm

Re: script compile error.

Post by zipperdude » November 1st, 2008, 8:19 pm

Ya idk if ill use it in a map im just doing it because im bored lol. but i have an idea in a map im making taht could use these.

What would happen if i dont?.... Are you gunna give me a lower score on my map? lol
Show me what lies just beyond my eyes
Would you take me to the world where my spirit flies?
Tell me is that really fact or a pack of lies?

Twiztid = By . Blink = Song.
[color=#00FF00]Drofder2004[/color] wrote:Its not out of nowhere, I carry it in my backpack, with my elephant, 32 pets, a spare pair of leggings, 20 fish feasts, a staff I use to magically disenchant things, a stone I can use to travel home, 20000 arrows, a portable stable with a gorilla, a cat and a wolf, 20 bandages and massive quantity of cloth.

Post Reply

Who is online

Users browsing this forum: No registered users and 29 guests