Quote:
Originally Posted by thndr
Maybe change total_jp column to a larger allowed integer?
|
It doesn't affect anything since the GS simply converts the number back into its type (probably an Int32).
Also I wouldn't recommend such changes anyways, you'll never know how it affects the gameserver itself, it may cause crashes or other issues.
Quote:
Originally Posted by mlejnek2
its in the table and i would really like it if there was a On log in Lua so hen players log on it auto resets there total_jp is say over 10 bil it will set it back to 10 bil so when they relog they dont get that error anymore...
|
I'm not quite sure if the total_jp is actually needed somehow (probably, as mentioned before, on a jobreset) but you could simply add something like this to the onlogin() function (if set_value supports total_jp, not sure about this):
Code:
-- The max value of 32-bit integer is 2,147,483,647
-- so we simply set it back to 1,000,000,000.
-- There is now enough left to not overflow
-- (except you powerlevel with 170 for 24 hours or something)
if gv("total_jp") > 1000000000 then
sv("total_jp", 1000000000)
end