12 Mar, 2010, yamtara wrote in the 1st comment:
Votes: 0
i ame using ubuntu 9.10 and i want to combine AnatoliaMUD3.1.1 to my computer. but lots of erro mssg. any one can help me to corecting msgg.
or any one combine this mud in his computer by using ubuntu 9.10 gcc 4x…. neets help
12 Mar, 2010, jurdendurden wrote in the 2nd comment:
Votes: 0
Ok so what kind of error messages are you getting?
12 Mar, 2010, Asylumius wrote in the 3rd comment:
Votes: 0
What version of GCC are you attempting to compile it with?
12 Mar, 2010, yamtara wrote in the 4th comment:
Votes: 0
act_wiz.c: In function do_mset:
act_wiz.c:4950: error: lvalue required as left operand of assignment


4950 in act_wiz

if (ORG_RACE(victim) == RACE(victim)) RACE(victim) = race;
ORG_RACE(victim) = race;
12 Mar, 2010, yamtara wrote in the 5th comment:
Votes: 0
Asylumius said:
What version of GCC are you attempting to compile it with?


c89-gcc (1) - ANSI (1989) C compiler
c99-gcc (1) - ANSI (1999) C compiler
gcc (1) - GNU project C and C++ compiler
gcc-4.4 (1) - GNU project C and C++ compiler
i486-linux-gnu-gcc (1) - GNU project C and C++ compiler
i486-linux-gnu-gcc-4.4 (1) - GNU project C and C++ compiler
12 Mar, 2010, jurdendurden wrote in the 6th comment:
Votes: 0
Can we see your ORG_RACE and RACE macros?
12 Mar, 2010, yamtara wrote in the 7th comment:
Votes: 0
thans for helping…
i thing much error it needs write to beggining
12 Mar, 2010, Sharmair wrote in the 8th comment:
Votes: 0
From what you have posted, it would appear that RACE(victim) evaluates to an rvalue.
As I can think of at least four different things that could make some sense as to what
this code is intended to do that would return rvalues, it would really help to see what
exactly RACE(victim) is. Though, only one (of the off hand things I thought of) would
have returned an lvalue with the older gcc compilers, so might have compiled ok in the
past. That would be the use of the ternary conditional expression operator (?:) in a
macro RACE(), something like:
#define RACE© ((©->orace == -1)? ©->race: ©->orace)

Note that this line is unlikely to be even close to your code, but is an example of
code that could cause the error you are getting in some compilers.
12 Mar, 2010, Cratylus wrote in the 9th comment:
Votes: 0
Is that dragon the default avatar or somfin? Everyone looks like frumpy now

:(
16 Mar, 2010, wildmak wrote in the 10th comment:
Votes: 0
lol , trying to figure out my next error , led me to this thread …. I'm out of time atm , but looks like someone is having the same problem, will contribute additional information later today.
16 Mar, 2010, wildmak wrote in the 11th comment:
Votes: 0
Ok , so I've had some more time to look at this … Quoting the OP

yamtara said:
act_wiz.c: In function do_mset:
act_wiz.c:4950: error: lvalue required as left operand of assignment


4950 in act_wiz

if (ORG_RACE(victim) == RACE(victim)) RACE(victim) = race;
ORG_RACE(victim) = race;


4950 in act_wiz.c is actually just

ORG_RACE(victim) = race;

and not the line above it as well, the ; at the end of 4949 should stop that line of code from going any further … also if I'm reading 4949 and 4950 correctly, they are both trying to define the same variable.

I commented 4950 out, and attempted to recompile. Re Compile appears to have not had any issues with that as there were no more errors in act_wiz or any warnings.

The next error that stopped the compile is

comm.c: In function nanny:
comm.c:1918: error: lvalue required as left operand of assignment


Comm.c Lines 1918 - 1921
ORG_RACE(ch) = race;
RACE(ch) = race;
for (i=0; i < MAX_STATS;i++)
ch->mod_stat[i] = 0;


I believe that this new error is unrelated to the old act_wiz.c error, as comm.c does not call for act_wiz in the include files, nor is ORG_RACE(victim) referenced.

Both ORG_RACE(ch) and RACE(ch) are heavily used and defined in other files.

ORG_RACE(ch) and RACE(ch) are both Defined in anatolia.h , which comm.c does call

#define RACE_OK(ch,skill)	IS_SET(skill_table[skill].race,(1 << (ORG_RACE(ch) - 1) ))

#define RACE(ch) (ch->race)
#define ORG_RACE(ch) (IS_NPC(ch) ? ch->pIndexData->race : ch->pcdata->race)


(Not sure if the anatolia.h info is relevant but included it in case it is).
16 Mar, 2010, David Haley wrote in the 12th comment:
Votes: 0
Don't just comment out code; that's like fixing your perfectly curable disease by chopping of the relevant limb.

BTW, this was already discussed here, along with a fix.
16 Mar, 2010, wildmak wrote in the 13th comment:
Votes: 0
David Haley said:
Don't just comment out code; that's like fixing your perfectly curable disease by chopping of the relevant limb.

BTW, this was already discussed here, along with a fix.


Well, I haven't seen anything else in regards to the initial act_wiz.c error that this thread started with on fixing that particular error (which is what I commented out).

The link you posted is a possible fix for the next error that occurred in comm.c (which I'm reading and about to try) , and while commenting something out is like fixing a perfectly curable disease by chopping off the relevant limb. Unlike Re-attaching said limb being extremely difficult, removing comment tags is fairly easy ;)
16 Mar, 2010, David Haley wrote in the 14th comment:
Votes: 0
The act_wiz.c and comm.c errors you gave are the exact same problem. Both have to do with the ORG_RACE problem.
16 Mar, 2010, wildmak wrote in the 15th comment:
Votes: 0
In anatolia.h

Changed
#define ORG_RACE(ch)		(IS_NPC(ch) ? ch->pIndexData->race : ch->pcdata->race)


To

#define ORG_RACE(ch)             if (IS_NPC(ch))
ch->pIndexData->race = race_lookup("human");
else
ch->pcdata->race = race_lookup("human");


Uncommented the act_wiz 4950 Line that I had Previously commented out.

Recieved following Error:

In file included from act_comm.c:39:
anatolia.h:2889: error: expected =, ,, ;, asm or __attribute__ before -> token



Also tried changing the anatolia.h define to

#define ORG_RACE(ch) ((IS_NPC(ch) ? ch->pIndexData->race : ch->pcdata->race))


With Similar Results.

Reverted Changes back to Initial Code , and back to the act_wiz error posted at the beginning of this thread.

Attempted suggested modifications in the anatolia.h file as that is the only location among the 3 involved files and lines that I saw the referenced (IS_NPC(ch) ? ch->pIndexData->race : ch->pcdata->race).
16 Mar, 2010, jurdendurden wrote in the 16th comment:
Votes: 0
David Haley said:
Don't just comment out code; that's like fixing your perfectly curable disease by chopping of the relevant limb.

BTW, this was already discussed here, along with a fix.


Based on this, and after looking again I realized that this line of code:

ORG_RACE(victim) = race;


is actually trying to assign something to an expression, so changing that line to:

victim->pcdata->race = race;


Should fix your problem.
16 Mar, 2010, jurdendurden wrote in the 17th comment:
Votes: 0
Now I have a question for you. There's like 8 different Makefiles for Anatolia 3.1.1, which one did you end up using? There's some in the lib folder, in the src folder, and possibly elsewhere.
16 Mar, 2010, David Haley wrote in the 18th comment:
Votes: 0
Quote
#define ORG_RACE(ch)             if (IS_NPC(ch))
ch->pIndexData->race = race_lookup("human");
else
ch->pcdata->race = race_lookup("human");

That's very wrong… just get rid of the macro.

jurdendurden said:
David Haley said:
Don't just comment out code; that's like fixing your perfectly curable disease by chopping of the relevant limb.

BTW, this was already discussed here, along with a fix.


Based on this, and after looking again I realized that this line of code:

ORG_RACE(victim) = race;


is actually trying to assign something to an expression, so changing that line to:

victim->pcdata->race = race;


Should fix your problem.

No – you're losing the conditional logic when you do this.
16 Mar, 2010, jurdendurden wrote in the 19th comment:
Votes: 0
That's true. Then just write out the whole thing, and do away with the macro.

if (IS_NPC(victim))
victim->pIndexData->race = race;
else
victim->pcdata->race = race;
17 Mar, 2010, wildmak wrote in the 20th comment:
Votes: 0
I've tried the original makefile that is generated by just doing a ./configure , I've also tried using the Makefile.original file that is in the src directory .

As far as the Compile goes, I have tried changing

ORG_RACE(victim) = race;


to

victim->pcdata->race = race;


and

if (IS_NPC(victim))
victim->pIndexData->race = race;
else
victim->pcdata->race = race;


Both Lines continue the compile until

comm.c: In function nanny:
comm.c:1918: error: lvalue required as left operand of assignment


Which is the same error line from page 1 after I attempted to comment out ORG_RACE without code re-writes
0.0/57