OK, I've got this code :
#define RED 55
#define AGSH_RBNode_Parent 0+
#define AGSH_RBNode_Color 3+
#define TO_LOCAL -
#define SEGADDR_INT 33
int memInt[100];
int debug2 = memInt[AGSH_RBNode_Parent(z TO_LOCAL SEGADDR_INT)];
int debug3 = memInt[AGSH_RBNode_Color(debug2)];
while ( debug3 == RED) {
...
}
When I complie, I get error "Parse error in expr near '55'", for the line containing while (...
I just don't get why.
Here is a clearer picture of what the code looks like after the pre-processor has replaced the macros :
int memInt[100];
int debug2 = memInt[0+(z - 33)];
int debug3 = memInt[3+(debug2)];
while ( debug3 == 55) {
...
}
I'm confused. ???
Could it be a bracket or similar missing somewhere else in the code?
#define RED 55
#define AGSH_RBNode_Parent 0+
#define AGSH_RBNode_Color 3+
#define TO_LOCAL -
#define SEGADDR_INT 33
int memInt[100];
int debug2, debug3;
function game_start() {
debug2 = memInt[AGSH_RBNode_Parent(z TO_LOCAL SEGADDR_INT)];
debug3; = memInt[AGSH_RBNode_Color(debug2)];
while ( debug3 == RED) {
...
}
}
I don't get it. What's your point here?
In case you believe I forgot to include this code in a function body, then, no, I'm not so stupid.
It's a truncated version of the code, to explain my issue.
I've already written several thousands of lines of codes in the AGS script before :)
DAMMIT!
I found the issue.
My macro declaration was actually :
#define RED 55;
STOOPID!
Thanks for putting time into this, dualnames.
Quote from: Monsieur OUXX on Wed 28/04/2010 19:36:53
DAMMIT!
I found the issue.
My macro declaration was actually :
#define RED 55;
STOOPID!
Thanks for putting time into this, dualnames.
Does the I'm with stoopid goes for me? :o
I usually kind of mess the declaration of variables, and I know your scripting is ACE. You even had an AGS benchmark for strings and integers, so it goes without saying.
EDIT: I was only getting dramatic. Glad you solved this on your own. :D
Quote from: Dualnames on Wed 28/04/2010 19:53:32
Does the I'm with stoopid goes for me? :o
Of course not! It goes for me!!!!
You didn't have any way to guess that I actually didn't copy-paste my #define statement properly!!!
Sorry if it was confusing :)
Implementing a red-black tree in AGS?
Crazy!