Blockland Forums > Modification Help
stops loading after "Loading Objects"
(1/1)
deathrider:
the game thinks i spawned but it does not load heres part of server.cs

--- Code: ---package Script_Message
{
  function gameConnection::onClientEnterGame(%client)
  {
  messageClient(%client, '', "\c6This server is running the Personal Message mod \c6use \c3/message USER MESSAGE \c6to send them a personal message.");
  }
};
activatepackage(Script_Message);
--- End code ---

the game does the message client but it does not load past objects
Kaphonaits:
This is because you are overwriting GameConnection::onClientEnterGame(%client), the default function spawns the player and such. However the only thing you've made it do once the client has entered the game and is ready to spawn is send that message. To fix this, run the parent function first, then message the client.
deathrider:

--- Quote from: Kaphonaits on April 08, 2012, 04:10:51 AM ---This is because you are overwriting GameConnection::onClientEnterGame(%client), the default function spawns the player and such. However the only thing you've made it do once the client has entered the game and is ready to spawn is send that message. To fix this, run the parent function first, then message the client.

--- End quote ---
this will take some time as i know nothing about parent
deathrider:
nevermind read one extra line and got it parent loads the default action for that command from blocklands main data files so i overright this command with my message then i make the command revert back to default
Greek2me:
So you would add parent::onClientEnterGame(%client); before your message.
Navigation
Message Index

Go to full version