03 Sep, 2010, jurdendurden wrote in the 1st comment:
Votes: 0
I'm trying to add a simple ifcheck in my mobprog code to compare a character's god to the specified god. This is for a sort of interactive temple we are building. Anyhow it doesn't seem to be checking it properly. I've also tested the ifchecks for class and race, class doesn't work, race does. I'm confused to why this is occuring. Especially since I'm using pretty much the exact same code for the god_lookup that is in stock for race_lookup. Here is the code:
So yeah, it's not evaluating at all the pc's god. Any ideas?
Note: After digging through while writing this, I noticed that the copy of mob_prog.c that I have does not even have a check for CHK_CLASS, even though it's defined…. Anyone know which mob_prog.c out there is the most up to date for Rom 2.4/Quickmud?
Try looking up what parameters the functions are returning; its possible they may not be returning what you think they are; this is often the problem for my builders with NPC triggers and code. Moreover, it may be worth testing for "error cases" from the returns within your conditional branch, if they exist.
Huh, I didn't even catch that. Sharp eyes. I was suspecting that conditional was failing somewheres, though.
Maya/Rudha
03 Sep, 2010, jurdendurden wrote in the 5th comment:
Votes: 0
Yup sure enough. Stupid typo. Cost me 3 hours of my day :/ Figured out though that the OLC in the Quickmud release in the repository is NOT 1.81 which seems to be the newest version (and has the CHK_CLASS check in it). Anyhow, thanks guys!
And the lookups:
So yeah, it's not evaluating at all the pc's god. Any ideas?
Note: After digging through while writing this, I noticed that the copy of mob_prog.c that I have does not even have a check for CHK_CLASS, even though it's defined…. Anyone know which mob_prog.c out there is the most up to date for Rom 2.4/Quickmud?