File object help [More Questions]

Author Topic: File object help [More Questions]  (Read 2769 times)

They do. Heavily, at that. Time how long it takes to start the Blockland client/server with/without RTB.
RTB doesn't pause my Blockland at all when I execute it. Regardless, even if it's because I have an OP CPU, the file would be executed at server startup and would be included in the 'initial startup' phase, so it doesn't really matter. Once it's executed you're good to go.

RTB doesn't pause my Blockland at all when I execute it. Regardless, even if it's because I have an OP CPU, the file would be executed at server startup and would be included in the 'initial startup' phase, so it doesn't really matter. Once it's executed you're good to go.

On an 3rd generation Intel i7, it freezes Blockland for about 3 seconds to execute it for the first time.


That is why script execution is handled while blockland itself or a server is loading.  That way you don't notice the game stopping while everything loads, because loading is what it is supposed to be doing.
What are you talking about?

Just asking, at what filesize would executing a script every so often (4 - 5 minutes maybe) cause an indecent amount of lag?

Just asking, at what filesize would executing a script every so often (4 - 5 minutes maybe) cause an indecent amount of lag?
That would depend on what the script does.

That would depend on what the script does.
saves/loads variables to assign to players

saves/loads variables to assign to players

Saving is fine, but why are you loading vars every 5 mins.

Vars should be loaded once when a client enters your server, saved every x amount of minutes and saved when a client drops from your server.

Saving is fine, but why are you loading vars every 5 mins.

Vars should be loaded once, saved every x amount of minutes and saved when a client drops from your server.
That's what I meant, sorry for no clarification.

It would be saving quite often and being loaded when the client rejoins

That's what I meant, sorry for no clarification.

It would be saving quite often and being loaded when the client rejoins

Are you still using the exec method?

Are you still using the exec method?
I'm deciding which one to use based on my needs

Don't use the execution method, just look at the disaster Tezuni's IP log add-on has caused.

Don't use the execution method, just look at the disaster Tezuni's IP log add-on has caused.

Well with the exec method I know exactly what it is doing, I have this sort of "fear", not really a fear but more of a protest against using scripts I'm not 100% sure as to what every individual part does.

With the script elm wrote there are many parts I'm not fully sure of as to what they do so it's preventing me from using it until I study up on them

Well with the exec method I know exactly what it is doing, I have this sort of "fear", not really a fear but more of a protest against using scripts I'm not 100% sure as to what every individual part does.

With the script elm wrote there are many parts I'm not fully sure of as to what they do so it's preventing me from using it until I study up on them

When i get off work, i can walk you through it. Anyways, for now, what is it that you don't understand?

Loading system for SO save files:

function gameConnection::loadData(%this)
{
   //set the path
   %path = "..path..";
   %f = new fileObject();
   %f.openForRead(%path);
   
   while(!%f.isEof())  //Not understood
   {
      %l = %f.readLine();
      
      //Could use a better check method but this is fine for me
      if(strStr(%l,"BEGIN") >= 0 || strStr(%l,"END") >= 0) //Not understood full purpose
         continue; // what does this even do?
      
      //append to var
      //method could cause problems with lots of data
      %so = %so @ %l;
   }
   
   eval("%nso = " @ %so); //Not understood anything below this at all
   
   if(isObject(%nso))
   {
      echo("Script object from file ==> " @ %nso @ ".");
      
      //tag the client
      %this.dataObject = %nso;
      
      return %nso;
   }
   else
      echo("Script object from file ==> failed to load.");
   
   return -1;
}