Jump to content
Sign in to follow this  
blanic

Object Null Help

Recommended Posts

If you make a variable public and it is assigned as a player ID and that player disconnects, it makes that a OBJECT NULL for whatever reason, I have tried to run a server script that checks if it is null and to clear it but it is not working. Any ideas how to get the server to check if the value is null empty scalar whatever and then correct it?

This is some of the code that i have for the server to check but its not working

while {true} do

{

if (isNull somepublicvariable) then

{

somepublicvariable= 0;

publicvariable "somepublicvariable";

};

};

Share this post


Link to post
Share on other sites

Use isNil for variable's

while {true} do 
{

     if (isNil ("somepublicvariable")) then 
         {
              somepublicvariable= 0;
              publicvariable "somepublicvariable";

         };
};

Share this post


Link to post
Share on other sites

will give it a whirl thanks

---------- Post added at 12:44 AM ---------- Previous post was at 12:33 AM ----------

nope when player disconnects that i used to set the value, it creates a OBJECT NULL still. I set it so every 10 seconds it would check to see if the value was null but its not working.

Share this post


Link to post
Share on other sites

Please post the code that is throwing the object null error.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×