Re: A couple of questions about the code...

Spawn@KrimsonMud
Date: 05/26/95


On Fri, 26 May 1995, John Mountcastle wrote:

> 
> 	I have been digging through my copy of CircleMUD 3.0bpl8 for the 
> past 10 hours and still cannot figure out the time function nor time_t.
> 
> 	Could someone explain them to me?
> 
> 	What I am trying to do is set the player's age, based on their 
> race, the first time they enter the game.  I know I need to access the 
> birth member of time_data (time_data { time_t birth; etc. } ).
> 
> 	What I did was cast the number into time_t then sent it to birth, 
> but I still get warning, also I dont think I'm doing it right.  Here's 
> what I did:
> 
> 	ch->time_info.birth = time((time_t *)(40 + dice(3, 5)));
> 
> 	The rvalue might be off here, as I do not recall the exact 
> structure name from memory, but this is basically it.  Can anyone help me?

	Why not use GET_AGE(ch) = whatever?  I _THINK_ that
	will work, although I never bothered with the ages for
	my races when I ran a MUD about 20 minutes ago :~(.
 
> 	Sorry, but I'm tired and cannot look at the code at the moment.  
> Also the backstab mult table in constants.c needs 36 changed to 
> LVL_IMPL+1, and I think either the saving throws or something in spells.h 
> needs to be changed similarly - sorry to be so vague, but I dont have the 
> code here, nor am I that compis mentis (sp?).

	Why would you change 36 to LVL_IMPL+1?  LVL_IMPL+1 is 35,
	since LVL_IMPL is #def'd at 34...  I think that was how it
	was, but since I lack Circle source anymore..

	
	Spawn@nothing



This archive was generated by hypermail 2b30 : 12/07/00 PST