Ananke Posted September 30, 2013 Author Share Posted September 30, 2013 Hi,There's possibility to break the 255 playerstats limit?Best Regards Link to comment Share on other sites More sharing options...
Stein Posted September 30, 2013 Share Posted September 30, 2013 Yes, however you'd need to delete all your items, NPCs and players. By default they're assigned Bytes, which are limited from 0-255, swapping them out for longs will let you go into the Billions though. Link to comment Share on other sites More sharing options...
Ananke Posted September 30, 2013 Author Share Posted September 30, 2013 Ah i forgot to change for longs. Thanks i wll check it later Link to comment Share on other sites More sharing options...
WiseRock Posted September 30, 2013 Share Posted September 30, 2013 Integer variables can hold values between -32,767 to 32,767Long variables can hold values between -2,147,483,647 to 2,147,483,647Byte variables can hold values between 0 to 255I agree with Frankenstein I would go with long since you can go up to 2,147,483,647. Link to comment Share on other sites More sharing options...
Ananke Posted September 30, 2013 Author Share Posted September 30, 2013 ```Public Sub SetPlayerStat(ByVal index As Long, ByVal Stat As Long, ByVal Value As Long) Player(index).Stat(Stat) = ValueEnd Sub```when i try to add 256 point i have problem over here :( Link to comment Share on other sites More sharing options...
Stein Posted September 30, 2013 Share Posted September 30, 2013 Did you change the actual .Stat declaration to a long? Link to comment Share on other sites More sharing options...
Ananke Posted September 30, 2013 Author Share Posted September 30, 2013 now there's problem with clinet, it's doesn't show more than 255 points :( Link to comment Share on other sites More sharing options...
Stein Posted September 30, 2013 Share Posted September 30, 2013 Because again, you have to change every reference related to stats into a Long, not a byte. ;) Link to comment Share on other sites More sharing options...
Ananke Posted September 30, 2013 Author Share Posted September 30, 2013 i did it.edit: ok i got it3Sub SetPlayerStat(ByVal Index As Long, Stat As Stats, ByVal value As Long) ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If Index > MAX_PLAYERS Then Exit Sub If value <= 0 Then value = 1 If value > MAX_byte Then value = MAX_byte **<–-- change byte to long** Player(Index).Stat(Stat) = value ' Error handler Exit Suberrorhandler: HandleError "SetPlayerStat", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd SubBig thanks 2 You!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now