CSGSI icon indicating copy to clipboard operation
CSGSI copied to clipboard

Int Null value handling

Open Guy293 opened this issue 6 years ago • 2 comments

Change it to other random number. Because if the player have -1 kill The program cant tell if its a null value or a real value. Thank you, Guy

Guy293 avatar Jun 10 '18 17:06 Guy293

Hi,

I have to admit, I had not thought of that (mainly because I don't play CS:GO anymore). But I'm not sure if returning int.MinValue will be an acceptable solution.

I'm thinking of maybe switching everything over to nullable value types (int? and bool?) because returning anything other than null will always be misleading in some context. This would mean breaking a lot of code for everyone, though.

If you have any ideas/suggestions, please feel free to share them with me.

rakijah avatar Jun 12 '18 11:06 rakijah

It will break lot of codes. Better solution will be to switch it to a lower number. And at the same time make a fixed version with bool return or something...

Guy293 avatar Jun 12 '18 18:06 Guy293