You are not logged in.
Pages: 1
I try to make with the makefile.bcc and I get (only) 3 errors.
[C++ Error] cmd1.c(168): E2140 Declaration is not allowed here
[C++ Error] cmd1.c(171): E2140 Declaration is not allowed here
[C++ Error] cmd1.c(174): E2140 Declaration is not allowed here
The lines are (I removed the comments in between the lines)
u32b element = cave_ff3_match(y, x, TERRAIN_MASK);
bool is_native = is_monster_native(y, x, r_ptr);
bool is_flying = (m_ptr->mflag & (MFLAG_FLYING)) != 0;
Above and below these declarations there are more declarations...
Any idea what the problem is.
As a quick fix, I tried separating the declarations and value assignements but that didn't help.
Offline
The problem may not be those lines but the ones above it. Is there any executable code (not variable declarations) right above it?
Offline
Yes, there is one line :
object_flags(o_ptr, &f1, &f2, &f3, &fn);
These lines are around line 165 in cmd1.c, in the function tot_dam_aux.
I'll try moving that line down to after the declarations, it should not break anything since those lines deal with the monster being damaged, not the item under scrutiny by object_flags.
Also, I was wrong, the other declaration were before those three lines, (and before object_flags) not after.
Offline
That was probably it. It should be moved down below all the declarations. That will cause a warning with most compilers, but I guess with borland it causes an error.
Offline
So, I moved it and it stopped the errors, but then another declaration, this time in cmd2.c caused a similar error, that was not reported as an error before. After I fix that, another new declaration error crops up.
So f&%k Borland.
I guess I'll just install LCC on my work laptop then. (Despite it not being allowed.)
Offline
Pages: 1