script compile error with my gsc's

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

Moderator: Core Staff

Post Reply
Pwn-Rikku
CJ Spammer!
CJ Spammer!
Posts: 679
Joined: August 15th, 2005, 7:58 pm

script compile error with my gsc's

Post by Pwn-Rikku » October 2nd, 2005, 3:36 pm

i did drofders tut for breakable anything then with my fx i made to gsc's this is my breakable anything script

Code: Select all

main() 
//maps\mp\jm_pwned_efx::main();
{
thread glass_break_01(); // 
thread glass_break_02(); // 
// 
} 

glass_break_01() //
{ 
glass_01 = getent("glass_01","targetname"); // 
trig_glass_01 = getent("trig_glass_01","targetname");//

dmg_01 = 0; // 
hp_01 = 50; // 
//

while(dmg_01 < hp_01) //

{ 
   trig_glass_01 waittill ("damage", idmg); // 
   dmg_01 += idmg; // 
   if (dmg_01 >= hp_01) // 
      { 
      glass_01 delete(); // 
      trig_glass_01 delete(); //
      } 
} 
}
now my jm_pwned_efx

Code: Select all

main()
{
level._effect["fire1"] = loadfx ("fx/fire/tinybon.efx");
maps\mp\_fx::loopfx("fire1", (0.0, 104.0, 216.0), 0.6);
level._effect["smoke"] = loadfx ("fx/smoke/ash_smoke.efx");
maps\mp\_fx::loopfx("smoke", (0.0, 112.0, 232.0), 0.7);
level._effect["fire2"] = loadfx ("fx/fire/tinybon.efx");
maps\mp\_fx::loopfx("fire2", (0.0, -168.0, 216.0), 0.6);
level._effect["smoke"] = loadfx ("fx/smoke/ash_smoke.efx");
maps\mp\_fx::loopfx("smoke", (0.0, -176.0, 224.0), 0.7);
maps\mp\_load::main()
}
can anyone help? aimed at drofder ^^
rikku
Rikku - Old skool
Image
Image

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

Post by Drofder2004 » October 2nd, 2005, 5:06 pm

With ALL errors a log is posted in the console (just beneath where it says "script compile error"). It should provide a number and whaht caused the error. Post that up while I see if I can manually see the problem.

Ok, nothing obviously wrong with the script so this is what your problem is....

Your mapping.
Have you made the given the scipt_brushmodels the correct "targetnames" have you spelt it all corectly?.
When you post the log, I will know for sure.
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

Pwn-Rikku
CJ Spammer!
CJ Spammer!
Posts: 679
Joined: August 15th, 2005, 7:58 pm

ok

Post by Pwn-Rikku » October 2nd, 2005, 5:25 pm

the log is
line 6: redifition of options_(Somthing)_xalign
i cant remember fully
rikku
Rikku - Old skool
Image
Image

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

Re: ok

Post by Drofder2004 » October 2nd, 2005, 5:26 pm

Pwn-Rikku wrote:the log is
line 6: redifition of options_(Somthing)_xalign
i cant remember fully
rikku
well, try and play the map and you will get the error again :P
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

Pwn-Rikku
CJ Spammer!
CJ Spammer!
Posts: 679
Joined: August 15th, 2005, 7:58 pm

lol

Post by Pwn-Rikku » October 2nd, 2005, 5:30 pm

yes i no ... i will do it then
*** script compile error *****
unexpected end of file
*************************
*************************
ERROR:script compile error
(see console for details)
*************************

RE_Shutdown( 0 )
-----server shutdown------
====shutdowngame====
-------------------------------------------------------------------------
Hunk_Clear: Reset he hunk ok
-------- R_init ----------
GL_VENDOR: ATI technologies inc.
Rikku - Old skool
Image
Image

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

Post by Drofder2004 » October 2nd, 2005, 5:43 pm

I just realised a few things...

1.
You have commented out you effects file (so that will not work) and you have also not put it inside the {} tags.

2.
You have told the script to launch "glass_break_02();" but when the script tries to find the actual function to go with it, it comes to a halt. It has come accross an "unexpected end to the file" ;)

So this should be what you gsc looks like after the 2 fixes.

Code: Select all

Main()
{
maps\mp\jm_pwned_efx::main();
thread glass_break_01();
}

glass_break_01()
{
glass_01 = getent("glass_01","targetname");
trig_glass_01 = getent("trig_glass_01","targetname");

dmg_01 = 0;
hp_01 = 50;

while(dmg_01 < hp_01)

{
   trig_glass_01 waittill ("damage", idmg);
   dmg_01 += idmg;
   if (dmg_01 >= hp_01)
      {
      glass_01 delete();
      trig_glass_01 delete();
      }
}
}
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

Pwn-Rikku
CJ Spammer!
CJ Spammer!
Posts: 679
Joined: August 15th, 2005, 7:58 pm

kk

Post by Pwn-Rikku » October 3rd, 2005, 5:34 pm

kk thxn i will test it and edit my post on the outcome
i also think something else!
rikku
Rikku - Old skool
Image
Image

Pwn-Rikku
CJ Spammer!
CJ Spammer!
Posts: 679
Joined: August 15th, 2005, 7:58 pm

lol

Post by Pwn-Rikku » October 3rd, 2005, 6:15 pm

i have done it! the problem is in the fire and smoke gsc i think well i got rid of that and it worked
but the functions didnt work on the break.. so i looked at the script and stuff
and figured out that u mentioned to different things glass_break_01 so i deleted that to
glass_01 and stuff testing and it works my code

Code: Select all

Main() 
{
thread glass_01(); 
} 

glass_01() 
{ 
glass_01 = getent("glass_01","targetname"); 
trig_glass_01 = getent("trig_glass_01","targetname"); 

dmg_01 = 0; 
hp_01 = 50; 

while(dmg_01 < hp_01) 

{ 
   trig_glass_01 waittill ("damage", idmg); 
   dmg_01 += idmg; 
   if (dmg_01 >= hp_01) 
      { 
      glass_01 delete(); 
      trig_glass_01 delete(); 
      } 
} 
}
so i would edit that code on the sticky drofder :)
rikku
Rikku - Old skool
Image
Image

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

Re: lol

Post by Drofder2004 » October 3rd, 2005, 6:21 pm

Pwn-Rikku wrote: so i would edit that code on the sticky drofder :)
rikku
No because I have tested my code and it works :roll:

Your problem had nothing to do with the thread title. Maybe just a small typo, or commented out line.
The title is used to "call" the thread, and nothing else, it has nothing to do with glass_01.

Just to prove it, rename it to...

thistitleiscallingthethreadwiththesametitle() :P

and it will still work. (unless there is a character limit >.<
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

Pwn-Rikku
CJ Spammer!
CJ Spammer!
Posts: 679
Joined: August 15th, 2005, 7:58 pm

^^

Post by Pwn-Rikku » October 3rd, 2005, 6:23 pm

ok drofder but i changed the thread and it worked
so i dunno? i changed it back and it didnt work
rikku
Rikku - Old skool
Image
Image

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 3 guests