Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Swec

Problem whit scripts

Recommended Posts

Hello.

I have a Problem whit scripts that i don't solve..
It is maybe really easy but i need help :P

http://img819.imageshack.us/img819/2818/scripto.jpg

I don't see what would be wrong whit line 7
and yee i am noob on this :P all my shitty comments after the lines to remember me what they are doing ^^

//Martin

Share this post


Link to post

If you've got #include "Zcommon.acS" in there twice, that's probably it. The error you're getting is from including that file too many times. That's probably the reason why you're not actually getting a line number marker in Doombuilder. My money is on that it's a multiple definition issue.

when you #include files ONLY DO IT ONCE. (AT THE TOP)

Hope this helps. :)

Share this post


Link to post

It tells you right there. "Invalid identifier (name) on line 7 of zspecial.acs". Not your script file. It's definitely the include.

Share this post


Link to post

That is weird.. I also tough of that 'file include' but i erased that but i still got the same error.

Share this post


Link to post

Make sure you don't have any other includes. You include zcommon.acs once, which has several includes itself for zspecial.acs, zdefs.acs, and zwvars.acs. That means when you include zcommon.acs, it merges all those files into your behavior lump at compile time. If you can, use something like pastebin.com to show us the entirety of your script. We might be able to spot something you missed.

Share this post


Link to post

#include "zcommon.acs"
script 1 OPEN // Start script
{
Sector_SetColor(123, 0,180,190); //Sector Tag, Value Red,Green,Blue Lavapit
Thing_Activate (111); //Thing ID for the spark object
delay(12); //Delay in Tics
restart; //Restarts the script
}
Script 2 OPEN // Start script
{
delay(30); //Delay in Tics/Light blinks
Light_ChangeToValue(222,255); //Sector Tag, Light Value
delay(2);
Light_ChangeToValue(222,168); //Old light value
restart;
} 
Script 3 OPEN // Start script
{
delay(46); //Delay in Tics/Light blinks
Light_ChangeToValue(333,255); //Sector Tag, Light Value
delay(2);
Light_ChangeToValue(333,168); //Old light value
restart;
} 

script 104 OPEN // Start script
{
    Sector_SetColor(103, 210,30,30); //Sector Tag, Value Red,Green,Blue Lava pit
    Sector_SetColor(123, 0,180,190); //Sector Tag, Value Red,Green,Blue Lava pit
}

script 100 OPEN
{
Sector_SetColor(122, 0,50,180); // sector Tag, Value Red,Green,Blue swimming pool red key area
}

script 170 (VOID)
{
    //Alarm player of artillery Reguest
    Print(S: "INCOMMING ARTILLERY!"); //The Text message that is displayed.
    
    //Short Delay Until artillery begins.
    Delay(130);

    //Lanch Artillery
    for(int i = 0; i < 30; i++ )
{ 
    delay(35); // Time between projectiles
    Thing_projectile(random(141,163),127, 0, 0, -100);
}
Jsut ignore the 'dummy text' after some lines. just trying to learn and remember. just beta stage so

Share this post


Link to post

For starters, assuming you didn't clip off the last line after pasting it, you're missing an ending bracket to close the for loop (or the last script). Everything else looks syntactically correct. If you're still getting the same error that you posted, make sure you're compiling the correct script. You might have a problem in your compiling environment.

If all else fails, you can manually compile the script with ACC. If it spits out an object file (.o file), the script was fine and you probably need to reconfigure some stuff in whatever level editor you're working with. If there is a compile error (in particular the same one you posted above) and it outputs a .err file, then you have something wrong with zcommon.acs or zspecial.acs. "Reinstalling" ACC from the ZDoom website with all those included files should fix that.

Share this post


Link to post

EarthQuake: i don't se whit ending bracket i am missing?

I got new problems.

Now i just got a line 39 'artillery reguest'..

unknown cast type in print statement. I don't see what is wrong whit that.

#include "zcommon.acs"
script 1 OPEN // Start script
{
Sector_SetColor(123, 0,180,190); //Sector Tag, Value Red,Green,Blue Lavapit
Thing_Activate (111); //Thing ID for the spark object
delay(12); //Delay in Tics
restart; //Restarts the script
}
Script 2 OPEN // Start script
{
delay(30); //Delay in Tics/Light blinks
Light_ChangeToValue(222,255); //Sector Tag, Light Value
delay(2);
Light_ChangeToValue(222,168); //Old light value
restart;
} 
Script 3 OPEN // Start script
{
delay(46); //Delay in Tics/Light blinks
Light_ChangeToValue(333,255); //Sector Tag, Light Value
delay(2);
Light_ChangeToValue(333,168); //Old light value
restart;
} 

script 104 OPEN // Start script
{
    Sector_SetColor(103, 210,30,30); //Sector Tag, Value Red,Green,Blue Lavapit
    Sector_SetColor(123, 0,180,190); //Sector Tag, Value Red,Green,Blue Lavapit
}

script 100 OPEN
{
Sector_SetColor(122, 0,50,180); // sector Tag, Value Red,Green,Blue swimmingpool red key area
}

script 170 (VOID)
{
    //Alarm player of artillery Reguest
    Print(S: "INCOMMING ARTILLERY!"); //The Text messange that is displayed.
    
    //Short Delay Until artillery begins.
    Delay(130);

    //Lanch Artillery
    for(int i = 0; i < 30; i++ )
{ 
    delay(35); // Time between projectiles
    Thing_projectile(random(141,163),127, 0, 0, -100);
}

Share this post


Link to post

Add another closing bracket at the end of the script and use a lower-case s in the print statement.

Print(s: "INCOMMING ARTILLERY!");

Share this post


Link to post

Thx that S replacer whit a small s did it all.. funny how something that easy can make a big problem :P

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×