> When trying to add races using to code found in the ceramic Mouse, I > came up with a few errors and changes. > Both changes were in the interpreter.c file and here they are: > > Change > > GETPFILEPOS(d->character) = create_entry(GET_NAME(d->character) > > To > > GETPFILEPOS(d->charachter) > create_entry(GET_NAME(d->charachter)) > Wow. Okay, first, when fixing code, if something is an assignment, you really ought to check what it's trying accomplish, and if it doesn't work, figure out why, instead of just easter egging it till the error goes away. Then, also don't rename the variables for the different structs. charachter is an interesting mispelling of character, but it won't work unless you've altered those structures. I'm sure that in both cases though, parts of the error you got read something like this: Function GETFILEPOS undefined, assuming return 'int', blahblahblah Function "GETPFILEPOS" not defined...blahblahblah Function "GETPFILEPOS" redefined. Definition conflicts with previous definition at line _x_. This is because there's no function called 'GETPFILEPOS'. The closest thing is actually a macro that reads 'GET_PFILEPOS'. You probably want to take your inital piece of code, and just change it to the name of the existing macro. Generally speaking, except when people are deliberately trying to confuse other coders, macros should be in all CAPS, and if you learned C before C++, you'll realize how awful it looks to mix case in function names, and you'll have them all in lowercase. Hope that helps. PjD +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 04/10/01 PDT