Actually, a bool is TRUE if the comparison in question does not evaluate to 0.
So, what you state is correct, it's for TRUE or FALSE. What he is using it for here, is legitimate. -----Original Message----- From: Tom Whiting [mailto:[EMAIL PROTECTED] Sent: Saturday, July 13, 2002 2:33 AM To: [EMAIL PROTECTED] Cc: [email protected] Subject: Re: Help with a strange problem please > > Can anyone help me with a very strange problem I am having? Basically, my > code looks like: > > bool get_flag( int index ) > { > bool ret_val = FALSE; > if( acct_flags ) *** > ret_val = acct_flags->bit[ index ]; > > return ret_val; > } First off, bool is for boolean functions, and SHOULD only return TRUE or FALSE, nothing else. so, that said, you might consider redoing somthing like int get_flag(int index), instead.. That seems to be more appropriate. Secondly, you're calling acct_flags here, but umm, hello, is it initialized somewhere? That's more than likely your problem right there, on THAT specific line. Like I said, look at the rest of the get_xxx arguments (get_social, get_clan, get_class, etc).. use those as a base to actually create function such as this. -- TJW :Head tech, designer, bum:P Mud :http://dreamless.wolfstream.net telnet :telnet://dreamless.wolfstream.net 9275 OLC Pages:http://olc.wolfstream.net -- ROM mailing list [email protected] http://www.rom.org/cgi-bin/mailman/listinfo/rom

