Page 1 of 2

script error

Posted: July 5th, 2007, 7:41 pm
by Mant!s NL
hi there, if I want to test my map with script etc it said bad syntax here is my gsc and I cant figure out.
main()
{

maps\mp\_load::main();
maps\mp\dustglass_SOUND();

thread tekst();
}

tekst()
{
trigger = getent ("tekst", "targetname");
while(1)
{
trigger waittill ("trigger", user);
user iprintlnbold("Congrats, " + user.name + ", ^1Found The Secret Room!");
wait 2;
user iprintlnbold("^4S^7tay ^4a^7while ^4a^7nd ^4t^7ake a ^4g^7ood ^4l^7ook ^4a^7round");
wait 2;
user iprintlnbold("^1H^7ave ^1F^7un ^1a^7nd ^1E^7njoy ^1w^7ith ^1t^7he ^1m^7usic!");
wait 3;
}
}
and here is the other gsc

key: targetname
value: dustglass_trig

speaker:
key: targetname
value: dustglass_speaker
main()
{

thread dustglass();
}

dustglass()
{
speaker = getent ("dustglass_speaker","targetname");
trigger = getent ("dustglass_trig","targetname");
while(1)
{
trigger waittill ("trigger");
speaker playsound("superstring");
wait(2)
}
}
thanks in advance

Posted: July 5th, 2007, 8:10 pm
by Lethal323
I didnt quite see anything wrong but I sure know a way you can tell what line it is on...


Load CoD

Type

Code: Select all

/developer 1
in console

load your map

When you get your Script Compile Error go into console and it will tell you from what line it was that it got that error... Look at that line, if you cant figure it out come here and I probably can...

Posted: July 5th, 2007, 8:22 pm
by Luke
only thing i could see was a missing ; after wait(2) in the 2nd gsc.

Posted: July 5th, 2007, 10:02 pm
by Lethal323
Ya, i never looked at the second script because he said it was in the 1st one... so... That could be a prob

Posted: July 7th, 2007, 10:34 am
by Mant!s NL
well here is the screenshot of the error;

http://img258.imageshack.us/my.php?image=errorde7.png

Posted: July 7th, 2007, 10:57 am
by Lethal323
Im not very good with loading other scripts so, someone else is gonna half to help ya, sorry...


I would just tell you to add the sounds to the bottom of the scripts, but thats not nesscacy to do because your idea will work fine if someone can fix the syntax...

Posted: July 7th, 2007, 1:07 pm
by Mant!s NL
ok no problem and I changed that ; behind the wait(2) but still the same problem.:S
maby you need my csv file here or...?

this is my pk3 file maby is there something wrong??

maps/mp/dustglass.bsp and dustglass.gsc and dustglass_SOUND.gsc
mp/dustglass.area file
sound/superstring
soundaliases/ dustglass.csv

Posted: July 7th, 2007, 1:26 pm
by Drofder2004
Change...

Code: Select all

maps\mp\dustglass_SOUND();
To...

Code: Select all

maps\mp\dustglass_SOUND::main();

Posted: July 8th, 2007, 2:22 pm
by Mant!s NL

Posted: July 8th, 2007, 4:19 pm
by Lethal323
I have an idea, may not be the greatest by hey..


Try taking off _sound and name it just dustglass see what happens

Posted: July 8th, 2007, 4:28 pm
by Drofder2004
It says cannot find script. Make sure everything is named correctly, and in its correct location. Remove the caps, change the wording , wahatever.

Posted: July 8th, 2007, 4:37 pm
by Lethal323
well when i looked at the error it said "maps/mp/dustglass.gsc" he has it marked as "dustglass_SOUND.gsc" that why I said try taking off the _SOUND

Posted: July 8th, 2007, 4:41 pm
by Mant!s NL
lol omg stupid error. so it should be maps\mp\dustlgass::main(); ?

Posted: July 8th, 2007, 4:44 pm
by Lethal323
ya, try it, see what happens..

Code: Select all

maps/mp/dustglass::main();

Posted: July 8th, 2007, 4:47 pm
by Mant!s NL
lol no didn't work:(