Fix Credits [message #402990] |
Wed, 16 September 2009 08:12 ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
![](/images/custom_avatars/21300.png) |
Jerad2142
Messages: 3807 Registered: July 2006 Location: USA
Karma: 6
|
General (3 Stars) |
|
|
Credits must be controlled by an int variable right now, it would be really nice if once you get up past 99999 (might need one more 9) it didn't suddenly jump to -######. Depending on how deep you were in ren's code you may be able to fix this I was thinking. But if you can't convert it into long int or something don't just make it so players can't go negative, some mods use the player's ability to go into "debt" as a feature.
Visit Jerad's deer sweat shop
|
|
|
|
|
|
|
|
|
|
Re: Fix Credits [message #403174 is a reply to message #403109] |
Thu, 17 September 2009 23:50 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
![](http://renegadeforums.com/images/custom_avatars/20224.png) |
EvilWhiteDragon
Messages: 3751 Registered: October 2005 Location: The Netherlands
Karma: 0
|
General (3 Stars) |
![348145220](/theme/Renegade_Forums/images/icq.png)
|
|
CarrierII wrote on Thu, 17 September 2009 19:53 | As a float? Weird.
|
Probably has to do with your money being:
money = points/10 + 2*refinery_alive_time + starting credits + harvloads*300
Since you can get 1 point ( or even 0.1 point) the moeny should be a float to follow the points/10 "rule".
![http://www.blackintel.org/usr/evilwhitedragon/pointfix.gif](http://www.blackintel.org/usr/evilwhitedragon/pointfix.gif)
BlackIntel admin/founder/PR dude (not a coder)
Please visit http://www.blackintel.org/
V, V for Vendetta | People should not be afraid of their governments.
Governments should be afraid of their people.
|
[Updated on: Thu, 17 September 2009 23:51] Report message to a moderator
|
|
|
|
Re: Fix Credits [message #403201 is a reply to message #403096] |
Fri, 18 September 2009 09:02 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
_SSnipe_
Messages: 4121 Registered: May 2007 Location: Riverside Southern Califo...
Karma: 0
|
General (4 Stars) |
|
|
CarrierII wrote on Thu, 17 September 2009 09:09 | The starting credits entry box for the Ren Client hosting options limits to 9,999.
A signed 16-bit integer would limit to 32767, so it could be a signed 16-bit. I've never had more than 15/17K credits. Someone try to give a player money above 32767, and see what happens (Either overflow to -32767 or it won't overflow till the number SEye gave earlier)
|
No wait one 5 hour game everyone donated me ther emoney, i had overr 100500 money or more i remember thinking over 100 thousand 500 credits maybe even more
|
|
|
Re: Fix Credits [message #403239 is a reply to message #403201] |
Sat, 19 September 2009 01:26 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
![](/images/custom_avatars/21300.png) |
Jerad2142
Messages: 3807 Registered: July 2006 Location: USA
Karma: 6
|
General (3 Stars) |
|
|
Yeah its a float, sorry for saying int, and dang I keep forgetting to see if I can replicate it, I'll try tonight.
Okay, it doesn't seem to flip negative until it exceeds 9 digits, so it doesn't like 1,000,000,000 and more, so I have no clue why I was seeing the error of it flipping negative so soon, and adding numbers like 0.1 too it works perfectly fine too, so it might have been like what StealthEye said and maybe the server I was on did some bad division or something. Furthermore, I was happy to see that Ren doesn't round up, as rounding up the display and not the actual value would make it impossible to buy things (IE says 400 at the bottom of the screen but you really have 399.9).
Visit Jerad's deer sweat shop
[Updated on: Sat, 19 September 2009 07:34] Report message to a moderator
|
|
|
Re: Fix Credits [message #403261 is a reply to message #403239] |
Sat, 19 September 2009 09:09 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) |
|
Jerad Gray wrote on Sat, 19 September 2009 09:26 | Yeah its a float, sorry for saying int, and dang I keep forgetting to see if I can replicate it, I'll try tonight.
Okay, it doesn't seem to flip negative until it exceeds 9 digits, so it doesn't like 1,000,000,000 and more, so I have no clue why I was seeing the error of it flipping negative so soon, and adding numbers like 0.1 too it works perfectly fine too, so it might have been like what StealthEye said and maybe the server I was on did some bad division or something. Furthermore, I was happy to see that Ren doesn't round up, as rounding up the display and not the actual value would make it impossible to buy things (IE says 400 at the bottom of the screen but you really have 399.9).
|
Which is why using an int and div instead of floating divide would be faster...
Forgot points are also floating, could just take the integer part of them, though.
Renguard is a wonderful initiative
Toggle Spoiler
BBC news, quoting... |
Supporters of Proposition 8 will argue California does not discriminate against gays, as the current law allows them to get married - as long as they wed a partner of the opposite sex.
|
halokid wrote on Mon, 11 October 2010 08:46 |
R315r4z0r wrote on Mon, 11 October 2010 15:35 |
![index.php?t=getfile&id=12992&private=0](index.php?t=getfile&id=12992&private=0)
|
the hell is that?
|
[Updated on: Sat, 19 September 2009 09:10] Report message to a moderator
|
|
|