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

Need help compiling a Doom 64 EX macro

Recommended Posts

When I try to compile a simple script in Doom Builder 64, this error message always appears no matter what I do: Expected a colon, but found: Open (11 : 4) (line = 1, pos = 7)

This is literally all i have in the script:

   #include "common.txt"
   
   macro 1
   {
        Door_CloseWait30Open(2);
        Thing_Spawn(3);
   }
I have no clue what's the problem here. Can someone (maybe Kaiser?) tell me what's wrong? It would be greatly appreciated.

Share this post


Link to post

Are you sure it's named Door_CloseWait30Open and not, say, Door_CloseWaitOpen? The parser complains about "Open" which do me would seem to imply it doesn't recognize Door_CloseWait30Open as a single token. I kind of get the feeling (perhaps wrong) that it understood it as "Door_CloseWait(30) Open" which is why it says it expected a colon but found Open.

Share this post


Link to post

Yeah, I tried it without the "30" and it says "unknown identifier". I was thinking the error message might've had to do with line 1, but I've tried placing a colon there and it didn't work.

Share this post


Link to post

Here's mine:

#setdir "D:\Games\Doom\Doom64\Builder64\Compilers\Doom64"
#include "common.txt"

macro 1
{
    Floor_LowerToLowest(4);
    Floor_LowerToLowest(6);
    Sector_CopyLightsAndInterpolate(4, 3);
    Sector_CopyLightsAndInterpolate(7, 3);
}
Not that your error points to this, but try specifying your compiler directory.

Share this post


Link to post

The error happens even with my directory being correct. If it helps any, I find no problems compiling when I don't have anything between the brackets of macro 1.

Share this post


Link to post

Sounds to me like it's not including common.txt, does it actually exist at your #setdir path?

Spoiler

//**************************************************************************
//**
//** common.txt
//**
//**************************************************************************

//
// SYSTEM (DO NOT MODIFY OR MOVE)
//
#define PushVar(var) 204:var
#define Delay(tic) 203:tic; wait

//
// DOORS
//
#define Door_Open(tag) 2:tag
#define Door_Close(tag) 3:tag
#define Door_Raise(tag) 4:tag
#define Door_CloseWait30Open(tag) 16:tag
#define Door_RaiseFast(tag) 108:tag
#define Door_OpenFast(tag) 109:tag
#define Door_CloseFast(tag) 110:tag

//
// FLOORS
//
#define Floor_Raise(tag) 5:tag
#define Floor_Lower(tag) 19:tag
#define Floor_RaiseToNearest(tag) 30:tag
#define Floor_LowerFast(tag) 36:tag
#define Floor_LowerChange(tag) 37:tag
#define Floor_LowerToLowest(tag) 38:tag
#define Floor_RaiseCrush(tag) 56:tag
#define Floor_Raise24(tag) 58:tag
#define Floor_Raise24Change(tag) 59:tag
#define Floor_RaiseToNearest2(tag) 119:tag
#define Floor_MoveByValue(tag, value) PushVar(value); 212:tag
#define Floor_MoveByValueFast(tag, value) PushVar(value); 228:tag
#define Floor_MoveByValueInstant(tag, value) PushVar(value); 229:tag
#define Floor_SetHeight(tag, height) PushVar(height); 244:tag
#define Floor_MoveByHeight(tag, height) PushVar(height); 247:tag

//
// STAIRS
//
#define Stairs_Build(tag) 8:tag
#define Stairs_Build16Fast(tag) 100:tag

//
// CEILINGS
//
#define Ceiling_RaiseCrush(tag) 6:tag
#define Ceiling_RaiseCrushOnce(tag) 25:tag
#define Ceiling_LowerToFloor(tag) 43:tag
#define Ceiling_RaiseCrush2(tag) 44:tag
#define Ceiling_StopCrusher(tag) 57:tag
#define Ceiling_SilentCrusher(tag) 141:tag
#define Ceiling_MoveByValue(tag, value) PushVar(value); 210:tag
#define Ceiling_MoveByValueFast(tag, value) PushVar(value); 226:tag
#define Ceiling_MoveByValueInstant(tag, value) PushVar(value); 227:tag
#define Ceiling_RaiseCrushOnceFast(tag) 232:tag
#define Ceiling_SetHeight(tag, height) PushVar(height); 245:tag
#define Ceiling_MoveByHeight(tag, height) PushVar(height); 252:tag

//
// PLATFORMS
//
#define Plat_DownWaitUp(tag) 10:tag
#define Plat_RaiseChange(tag) 22:tag
#define Plat_PerpetualRaise(tag) 53:tag
#define Plat_Stop(tag) 54:tag
#define Plat_DownWaitUp24(tag) 66:tag
#define Plat_DownWaitUp32(tag) 67:tag
#define Plat_DownWaitUpFast(tag) 121:tag
#define Plat_UpWaitDown(tag) 122:tag
#define Plat_UpWaitDownFast(tag) 123:tag
#define Plat_DownUpByValue(tag, value) PushVar(value); 236:tag
#define Plat_DownUpFastByValue(tag, value) PushVar(value); 237:tag
#define Plat_UpDownByValue(tag, value) PushVar(value); 238:tag
#define Plat_UpDownFastByValue(tag, value) PushVar(value); 239:tag

//
// TELEPORT
//
#define Teleport_ToDest(tid) 39:tid
#define Teleport_Stomp(tid) 249:tid

//
// ACTORS
//
#define Thing_ModifyFlags(tid) 93:tid
#define Thing_Alert(tid) 94:tid
#define Thing_SpawnDart(tid) 202:tid
#define Thing_Spawn(tid) 224:tid
#define Thing_SpawnTracer(tid) 231:tid
#define Thing_SetReactionTime(tics) 233:tics
#define Thing_Dissolve(tid) 242:tid

//
// SECTORS
//
#define Sector_SetFloorColorID(tag, id) PushVar(id); 205:tag
#define Sector_SetCeilingColorID(tag, id) PushVar(id); 206:tag
#define Sector_SetThingColorID(tag, id) PushVar(id); 207:tag
#define Sector_SetUpperWallColorID(tag, id) PushVar(id); 208:tag
#define Sector_SetLowerWallColorID(tag, id) PushVar(id); 209:tag
#define Sector_CopyFlags(dsttag, srctag) PushVar(srctag); 220:dsttag
#define Sector_CopySpecials(dsttag, srctag) PushVar(srctag); 221:dsttag
#define Sector_CopyLights(dsttag, srctag) PushVar(srctag); 222:dsttag
#define Sector_CopyTextures(dsttag, srctag) PushVar(srctag); 223:dsttag
#define Sector_CopyLightsAndInterpolate(dsttag, srctag) PushVar(srctag); 235:dsttag

//
// LINES
//
#define Line_CopyFlags(dsttag, srctag) PushVar(srctag); 218:dsttag
#define Line_CopyTextures(dsttag, srctag) PushVar(srctag); 219:dsttag
#define Line_CopySpecials(dsttag, srctag) PushVar(srctag); 230:dsttag
#define Line_TriggerRandomLinesByTag(tags) 240:tags

//
// ELEVATORS
//
#define Elevator_MoveByValue(tag, value) PushVar(value); 214:tag

//
// PILLARS
//
#define Pillar_OpenByValue(tag, value) PushVar(value); 241:tag

//
// CAMERAS
//
#define Camera_Clear(tid) 200:tid
#define Camera_Set(tid) 201:tid
#define Camera_MoveAndAim(tid, nexttid) PushVar(nexttid); 243:tid

//
// MACROS
//
#define Macro_Suspend(id) 248:id
#define Macro_Enable(id) 250:id
#define Macro_Disable(id) 251:id

//
// MISC
//
#define Player_Freeze(tics) 233:tics
#define Quake(tics) 225:tics
#define SetLightID(dst, src) PushVar(src); 234:dst
#define Exit 52:0
#define ExitToLevel(map) 124:map
#define UnlockCheatMenu 253:0
#define DisplaySkyLogo 254:0
#define No_Op 0:0

Share this post


Link to post

Sorry for the late response.

I have confirmed that my #setdir line is right. The problem is the code itself.



I copied and pasted your script into DB64 and it compiled without fail.



Perhaps the syntax is incorrect? Where do I find the thing ID of something?

Share this post


Link to post

Figured it out...

The BLAM compiler is reacting badly to any definition in common.txt which has a number in its name:

#define Door_CloseWait30Open(tag)                       16:tag
#define Floor_Raise24(tag)                              58:tag
#define Floor_Raise24Change(tag)                        59:tag
#define Floor_RaiseToNearest2(tag)                      119:tag
#define Stairs_Build16Fast(tag)                         100:tag
#define Ceiling_RaiseCrush2(tag)                        44:tag
#define Plat_DownWaitUp24(tag)                          66:tag
#define Plat_DownWaitUp32(tag)                          67:tag
As a workaround, use the corresponding number of the action. In your case, simply putting 16 will work instead of Door_CloseWait30Open.
   #include "common.txt"
   
   macro 1
   {
        16:2;
        Thing_Spawn(3);
   }
I'll post a bug report for Kaiser/DotFloat...

Share this post


Link to post

No problem, I love this port and I'd like to complete a mapset myself, so it's handy to figure these things out.

Looking forward to what you can do with it.

Share this post


Link to post
iori said:

Figured it out...

The BLAM compiler is reacting badly to any definition in common.txt which has a number in its name


So you could also do something like:

   #include "common.txt"
   #define Door_CloseWaitThenOpen(tag) 16:tag
   
   macro 1
   {
        Door_CloseWaitThenOpen(2);
        Thing_Spawn(3);
   }

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
×