23 Nov, 2008, Ssolvarain wrote in the 1st comment:
Votes: 0
So, I make and the compiler stops on the const.c file of QuickMUD with:
const.c:28:9: macro names must be identifiers const.c:77: error: `OBJ_VNUM_CUSTOM_SWORD' undeclared here (not in a function) const.c:77: error: initializer element is not constant const.c:77: error: (near initialization for `weapon_table[0].vnum') const.c:77: error: initializer element is not constant const.c:77: error: (near initialization for `weapon_table[0]') const.c:78: error: `OBJ_VNUM_CUSTOM_MACE' undeclared here (not in a function) const.c:78: error: initializer element is not constant const.c:78: error: (near initialization for `weapon_table[1].vnum') const.c:78: error: initializer element is not constant const.c:78: error: (near initialization for `weapon_table[1]') const.c:79: error: `OBJ_VNUM_CUSTOM_DAGGER' undeclared here (not in a function) const.c:79: error: initializer element is not constant const.c:79: error: (near initialization for `weapon_table[2].vnum') const.c:79: error: initializer element is not constant const.c:79: error: (near initialization for `weapon_table[2]') const.c:80: error: `OBJ_VNUM_CUSTOM_AXE' undeclared here (not in a function) const.c:80: error: initializer element is not constant const.c:80: error: (near initialization for `weapon_table[3].vnum') const.c:80: error: initializer element is not constant const.c:80: error: (near initialization for `weapon_table[3]') const.c:81: error: `OBJ_VNUM_CUSTOM_STAFF' undeclared here (not in a function) const.c:81: error: initializer element is not constant const.c:81: error: (near initialization for `weapon_table[4].vnum') const.c:81: error: initializer element is not constant const.c:81: error: (near initialization for `weapon_table[4]') const.c:82: error: `OBJ_VNUM_CUSTOM_FLAIL' undeclared here (not in a function) const.c:82: error: initializer element is not constant const.c:82: error: (near initialization for `weapon_table[5].vnum') const.c:82: error: initializer element is not constant const.c:82: error: (near initialization for `weapon_table[5]') const.c:83: error: `OBJ_VNUM_CUSTOM_WHIP' undeclared here (not in a function) const.c:83: error: initializer element is not constant const.c:83: error: (near initialization for `weapon_table[6].vnum') const.c:83: error: initializer element is not constant const.c:83: error: (near initialization for `weapon_table[6]') const.c:84: error: `OBJ_VNUM_CUSTOM_POLEARM' undeclared here (not in a function) const.c:84: error: initializer element is not constant const.c:84: error: (near initialization for `weapon_table[7].vnum') const.c:84: error: initializer element is not constant const.c:84: error: (near initialization for `weapon_table[7]') const.c:85: error: initializer element is not constant const.c:85: error: (near initialization for `weapon_table[8]') make: *** [obj/const.o] Error 1
23 Nov, 2008, Ssolvarain wrote in the 5th comment:
Votes: 0
Actually, I made a made a typo (or nine) in the customize.h file. I had altered it to OBJ_VNUM_SCHOOL_* to see what would happen, forgot to change it back to match what I had changed in const.c
(future reference to myself) That compiler error was basically telling me that it was NOT defined properly in the function included, despite what my meatbag head decided.
23 Nov, 2008, David Haley wrote in the 6th comment:
Votes: 0
In general, the compiler is (almost) Always Right. :wink:
23 Nov, 2008, Ssolvarain wrote in the 7th comment:
Votes: 0
The sheer amount of errors that can come from a single out of place character can be quite alarming!
I think that i am going to enjoy reading this thread, with meatbag heads and compilers being arseholes and the like, its a good giggle first thing in the morning. Keep up the good work Ssolvarain.
23 Nov, 2008, Hades_Kane wrote in the 10th comment:
Votes: 0
Ssolvarain said:
The sheer amount of errors that can come from a single out of place character can be quite alarming!
That's one of the first and most useful things you can come to understand :p
Sometimes a misplaced ; or forgetting a ) will make it look like you've messed something up so bad you think you'd never get it fixed.
23 Nov, 2008, Ssolvarain wrote in the 11th comment:
Votes: 0
What does || do, exactly? I'm seeing that it only comes after an if check. I could hazard a guess that it means "or" or "and".
Aye, I understand != and so on. The || threw me off a bit.
And… donkey? o_0
LOL i thought it was funny at the time as there is no "and or" so an ee or was the best i could do.
27 Nov, 2008, Ssolvarain wrote in the 16th comment:
Votes: 0
Someone suggested I tinker with who and score, but I'm having a few issues understanding it. I've found the do_who function in lookup.c, but I get the feeling this isn't quite what I'm looking for. Or it is, but I'm just being nubbish about it. Any tips?
I would suggest starting with score instead, as it is a lot more straight forward.
27 Nov, 2008, Ssolvarain wrote in the 18th comment:
Votes: 0
Yeah, that was the one first suggested, which I should have stuck with. Wish I had a faster way to look through all these files rather than manually search through them.
or grep do_score *.* works, i don't know what the [ch] part does for grep but *.* searches all files in the directory you are currently in that have a suffix, even the ones like Makefile.Linux and README.first etc. or if you know it's in a .c file just grep do_score *.c and that'll narrow down your results to the ones you want. and the do_score function i belive is in act_info.c file in most diku based muds.
const.c:28:9: macro names must be identifiers
const.c:77: error: `OBJ_VNUM_CUSTOM_SWORD' undeclared here (not in a function)
const.c:77: error: initializer element is not constant
const.c:77: error: (near initialization for `weapon_table[0].vnum')
const.c:77: error: initializer element is not constant
const.c:77: error: (near initialization for `weapon_table[0]')
const.c:78: error: `OBJ_VNUM_CUSTOM_MACE' undeclared here (not in a function)
const.c:78: error: initializer element is not constant
const.c:78: error: (near initialization for `weapon_table[1].vnum')
const.c:78: error: initializer element is not constant
const.c:78: error: (near initialization for `weapon_table[1]')
const.c:79: error: `OBJ_VNUM_CUSTOM_DAGGER' undeclared here (not in a function)
const.c:79: error: initializer element is not constant
const.c:79: error: (near initialization for `weapon_table[2].vnum')
const.c:79: error: initializer element is not constant
const.c:79: error: (near initialization for `weapon_table[2]')
const.c:80: error: `OBJ_VNUM_CUSTOM_AXE' undeclared here (not in a function)
const.c:80: error: initializer element is not constant
const.c:80: error: (near initialization for `weapon_table[3].vnum')
const.c:80: error: initializer element is not constant
const.c:80: error: (near initialization for `weapon_table[3]')
const.c:81: error: `OBJ_VNUM_CUSTOM_STAFF' undeclared here (not in a function)
const.c:81: error: initializer element is not constant
const.c:81: error: (near initialization for `weapon_table[4].vnum')
const.c:81: error: initializer element is not constant
const.c:81: error: (near initialization for `weapon_table[4]')
const.c:82: error: `OBJ_VNUM_CUSTOM_FLAIL' undeclared here (not in a function)
const.c:82: error: initializer element is not constant
const.c:82: error: (near initialization for `weapon_table[5].vnum')
const.c:82: error: initializer element is not constant
const.c:82: error: (near initialization for `weapon_table[5]')
const.c:83: error: `OBJ_VNUM_CUSTOM_WHIP' undeclared here (not in a function)
const.c:83: error: initializer element is not constant
const.c:83: error: (near initialization for `weapon_table[6].vnum')
const.c:83: error: initializer element is not constant
const.c:83: error: (near initialization for `weapon_table[6]')
const.c:84: error: `OBJ_VNUM_CUSTOM_POLEARM' undeclared here (not in a function)
const.c:84: error: initializer element is not constant
const.c:84: error: (near initialization for `weapon_table[7].vnum')
const.c:84: error: initializer element is not constant
const.c:84: error: (near initialization for `weapon_table[7]')
const.c:85: error: initializer element is not constant
const.c:85: error: (near initialization for `weapon_table[8]')
make: *** [obj/const.o] Error 1
The lines in question are:
I know they are defined in customized.h, so I think I'm goofing something up somewhere.