![]() |
|
FIX IT - Printable Version +- ItsMods (https://www.itsmods.com) +-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html) +--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html) +--- Thread: FIX IT (/Thread-FIX-IT.html) |
FIX IT - Nekochan - 07-16-2012 Hey, FIX IT, when there're 0 players at server, and some loop with "Client" ent runned, it says error or server crashes, Error is: Object reference not set to an instance of an object ( Google translate ftw ). RE: FIX IT - Romuald27 - 07-16-2012 Maybe with "Please" ? ![]() And now you will insult me on Steam
RE: FIX IT - Nekochan - 07-16-2012 (07-16-2012, 18:21)Romuald27 Wrote: Maybe with "Please" ? Maybe you will shut up? ![]() And now you will spam here
RE: FIX IT - Pozzuh - 07-16-2012 if(client == null) return; RE: FIX IT - Nekochan - 07-16-2012 (07-16-2012, 19:06)Pozzuh Wrote: if(client == null) return; i did it, but anyways, it there way to make something like gscs? RE: FIX IT - JariZ - 07-16-2012 I used to do if(GetClients() == null) It's like 1 line extra to your code and it's kinda easy to check. So @zxz0O0 feel free to ignore this thread. RE: FIX IT - estebespt - 07-16-2012 (07-16-2012, 19:59)JariZ Wrote: I used to do if(GetClients() == null) He would ignore it anyway since he is on a 3 week vacation ^^ goodluck with the complaints
RE: FIX IT - surtek - 07-16-2012 When I read the title I thought about: ![]() Ontopic: not really hard to implement a small fix in each plugin. RE: FIX IT - master131 - 07-17-2012 GetClients should still be returning an empty List<ServerClient> instead of a null object. @zxz0O0 RE: FIX IT - zxz0O0 - 08-02-2012 (07-17-2012, 17:39)master131 Wrote: GetClients should still be returning an empty List<ServerClient> instead of a null object. @zxz0O0 The function is checking if the server is running, if not it returns NULL. This is how @Nukem coded it and I am ok with that. You can, as @JariZ said, just check the List for NULL or use check if the dvar sv_running is 0. |