Guitar Freak
_LüA_n☺b_
Note: Im aware that I could/should've posted this on C++ section, but the amount of people that ever checks the Support section there just didnt "sell" it for me, so Id rather take my chances and post it here!
Anyway, to the point. Checking another thread with a similar request, I just realized that this:
Is the exact amount where money "bugs" on my 0.3.5pl1 servers (and any other 0.3.5+ TFS for that matter).
I never knew why it happened, someone told me it was a LUA problem, that LUA just couldnt read values over that number so they bugged after that point, but now that I see this..
I guess maybe there is a way to change and fix this problem through sources? :blink:
♠ About the bug:
The "money bug" Im talking about is the fact that after 4294967295 (4.2 billion), if you had for example 4294967296 and you did the command to check your money it would tell you that you have 1 gp, instead of 4294967296. It just kinda resets, and if you buy something that costs 2 gp when having 4294967296, you lose 1 gp + the other 4294967295 on the purchase 4294967296 gp for the price of 2, pretty good deal isnt it?
I already found a way to go "around" this problem, but if a direct solution like this was possible, it would definitely be better!
♠ The question:
So Im wondering:
Is there any way to change the "uint32_t" value (the one with 4294967295 as max value) for this matter, to "uint64_t" (which has "18446744073709551615" as max value) ?
♠ The consequences:
Do you think it would fix the problem? And would it affect the server's "technical" performance in any way? Like making it lag, or non-compatible with certain OSs or something similar?
♠ The.. end? :blink:
Im very lousy at hardcoding and Im clueless on how to even start with this issue so some help would be very appreciated here!
As always, Ill be +Repping real helpful responses eace:
Thanks in advance.
Anyway, to the point. Checking another thread with a similar request, I just realized that this:
4294967295 (max value of uint32_t)
Is the exact amount where money "bugs" on my 0.3.5pl1 servers (and any other 0.3.5+ TFS for that matter).
I never knew why it happened, someone told me it was a LUA problem, that LUA just couldnt read values over that number so they bugged after that point, but now that I see this..
I guess maybe there is a way to change and fix this problem through sources? :blink:
♠ About the bug:
The "money bug" Im talking about is the fact that after 4294967295 (4.2 billion), if you had for example 4294967296 and you did the command to check your money it would tell you that you have 1 gp, instead of 4294967296. It just kinda resets, and if you buy something that costs 2 gp when having 4294967296, you lose 1 gp + the other 4294967295 on the purchase 4294967296 gp for the price of 2, pretty good deal isnt it?
I already found a way to go "around" this problem, but if a direct solution like this was possible, it would definitely be better!
♠ The question:
So Im wondering:
Is there any way to change the "uint32_t" value (the one with 4294967295 as max value) for this matter, to "uint64_t" (which has "18446744073709551615" as max value) ?
♠ The consequences:
Do you think it would fix the problem? And would it affect the server's "technical" performance in any way? Like making it lag, or non-compatible with certain OSs or something similar?
♠ The.. end? :blink:
Im very lousy at hardcoding and Im clueless on how to even start with this issue so some help would be very appreciated here!
As always, Ill be +Repping real helpful responses eace:
Thanks in advance.
Last edited: