| Blockland Forums > Modification Help |
| Parent::OnClientEnterGame ? [Why is it still breaking?] |
| (1/1) |
| Wordy:
--- Code: ---package ScoreSaver { function GameConnection::OnClientLeaveGame(%Client) { DoSave(%Client); Parent::OnClientLeaveGame(%Client); warn("Done the save."); } function GameConnection::OnClientEnterGame(%Client) { Parent::OnClientEnterGame(%Client); Schedule(500,0,LoadScore,%Client); Warn("Loaded the save."); } }; --- End code --- I packaged it and all that stuff. I have included Parent::OnClientBLAGame but yet it has broken and will not let me spawn inside the game and keeps me at the 'Loading Objects...' bar. I was wondering if it would be to do with where I put the parent. --- Code: ---function GameConnection::OnClientEnterGame(%Client) { Schedule(500,0,LoadScore,%Client); Warn("Loaded the save."); Parent::OnClientEnterGame(%Client); // this has gone below, would this work? } --- End code --- Or do I have to do something which I haven't done before? I have not really played around with parents yet, so I thought I'd forget it up. |
| Wordy:
Fixed the script. I had put the Parent in the wrong place like a friend... noob mistake I guess. |
| Kalphiter:
I believe you have to return the parent otherwise the server will crash every once in awhile. |
| Greek2me:
--- Quote from: Kalphiter on March 14, 2012, 03:04:47 PM ---I believe you have to return the parent otherwise the server will crash every once in awhile. --- End quote --- Can you tell me a bit more about that? Do you know how long it would take the server to crash or whether there would be an error message? What exactly would trigger it? Thanks. |
| Navigation |
| Message Index |