Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FIX IT
#1
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 ).
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#2
Maybe with "Please" ? Smile


And now you will insult me on Steam Troll
Reply

#3
(07-16-2012, 18:21)Romuald27 Wrote: Maybe with "Please" ? Smile


And now you will insult me on Steam Troll

Maybe you will shut up? Smile


And now you will spam here Troll
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#4
if(client == null) return;
[Image: MaEIQ.png]
Reply

#5
(07-16-2012, 19:06)Pozzuh Wrote: if(client == null) return;

i did it,
but anyways, it there way to make something like gscs?
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#6
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.
Reply

#7
(07-16-2012, 19:59)JariZ Wrote: 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.

He would ignore it anyway since he is on a 3 week vacation ^^ goodluck with the complaints Troll
LOL
Reply

#8
When I read the title I thought about:

[Image: SimonizFixItproPen1__64229_zoom.jpg]

Ontopic: not really hard to implement a small fix in each plugin.
Reply

#9
GetClients should still be returning an empty List<ServerClient> instead of a null object. @zxz0O0
[Image: 30xhrep.png]

A casual conversation between barata and I about Nukem.
Reply

#10
(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.
[Image: azuw.jpg]
Reply



Forum Jump:


Users browsing this thread:
6 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.