Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ An odd problem
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Metsuro
USA (389 posts) Bio
|
Date
| Sat 22 Jul 2006 08:35 PM (UTC) |
Message
| int chakra = (int)( ( get_curr_con(ch) + get_curr_int(ch))/2 * 100 );
if( chakra < 100 )
chakra = 100;
if( ch->max_mana != chakra )
ch_printf( ch, "You gained %d chakra.\r\n", ( chakra - ch->max_mana ) );
ch->max_mana = chakra;
int life = (int)( ( get_curr_str(ch) + get_curr_dex(ch))/2 * 100 );
if( life < 100 );
life = 100;
if( ch->max_hit != life )
ch_printf( ch, "You gained %d life.\r\n", ( life - ch->max_hit ) );
ch->max_hit = life;
alright the code above doesn't exactly work. The first portion about chakra works, but life doesn't... why is that? anyone know? |
Everything turns around in the end | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #1 on Sat 22 Jul 2006 08:43 PM (UTC) |
Message
| What's not working? The entire block of code? |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Metsuro
USA (389 posts) Bio
|
Date
| Reply #2 on Sat 22 Jul 2006 08:45 PM (UTC) |
Message
| no its just the portion about life. Chakra changes and updates properly. However life doesn't, it just defaults to 100, and it should be at 2500, like the chakra. |
Everything turns around in the end | Top |
|
Posted by
| Tzaro
USA (41 posts) Bio
|
Date
| Reply #3 on Sat 22 Jul 2006 09:05 PM (UTC) |
Message
| if( life < 100 );
remove the ; and you should be good.
-Tz |
Implementer of Lost Prophecy,
Tzaro | Top |
|
Posted by
| Metsuro
USA (389 posts) Bio
|
Date
| Reply #4 on Sat 22 Jul 2006 09:07 PM (UTC) |
Message
| oi, right I didn't even notice that... thanks lol. |
Everything turns around in the end | Top |
|
Posted by
| Tzaro
USA (41 posts) Bio
|
Date
| Reply #5 on Sat 22 Jul 2006 09:08 PM (UTC) |
Message
| no prob :) |
Implementer of Lost Prophecy,
Tzaro | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
19,479 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top