ID:170681
 
How do I reboot the world?

Whenever I do this:

world
proc
Gameover()
world.Reboot()


It starts rebooting but never quite reboots.
First of all, it should just be

proc/GameOver()
world.Reboot()


However, that seems like a complete waste to me. In any code where actually using GameOver() is valid, there would be absolutely no reason not to just use world.Reboot() itself.
In response to Wizkidd0123
No it is valid because it's a playground game in which when everyone has lost, the game reboots so another round of the game can begin.

And no proc/GameOver() made no difference. DS often crashes aswell when trying to relog, but most of the times it just doesn't relog.
In response to DeathAwaitsU
DeathAwaitsU wrote:
No it is valid because it's a playground game in which when everyone has lost, the game reboots so another round of the game can begin.

And no proc/GameOver() made no difference. DS often crashes aswell when trying to relog, but most of the times it just doesn't relog.

I use thos verb to reboot the world.
mob/Admin
verb
Reboot()
set category = "Admin"
world << "<b>*Game is Rebooting in 10 Seconds*</b>"
sleep(100)
world.Reboot()


U can mod it around to whatever u need
In response to ElderKain
That is clearly the same thing as I was doing only in a verb.
In response to DeathAwaitsU
DeathAwaitsU wrote:
And no proc/GameOver() made no difference.

That's exactly what I'm saying. proc/GameOver is simply a waste of space (although it happens to be a very small waste). There's absolutely no reason for it.
In response to DeathAwaitsU
DeathAwaitsU wrote:
That is clearly the same thing as I was doing only in a verb.

Nice.

People volunteer to help you out of the goodness of their heart: Don't act like that.
In response to Wizkidd0123
It isn't the full proc of GameOver(). There are some other bits checking to actually end the game.
In response to DeathAwaitsU
Yuck! Rebooting to start a new round?

You should make a procedure to restart the round. Like my Mice game does, and my CtF game.
In response to DeathAwaitsU
DeathAwaitsU wrote:
It isn't the full proc of GameOver(). There are some other bits checking to actually end the game.

Well, that makes sense. Still, you shouldn't be rebooting in order to start a new round. IMO, that's just a really, really bad idea which ruins any atmosphere or "flow" that a game could possibly have.

Anyway, you need to show us the rest of GameOver() and, if applicable, the situation in which you call it.
In response to Wizkidd0123
Its a freeze tag game, I dont know if you've played the current one before but it's like that:

proc/GameOver(end)
if(end)
world << "<font size = 4><b>Everyone is frozen! Rebooting!"
sleep(100)
world.Reboot()
for(var/mob/nonit/M in world)
if(!M.cfrozen)
return
for(var/mob/itnon/B in world)
if(!B.cfrozen)
return
world << "<font size = 4><b>Everyone is frozen! Rebooting!"
sleep(100)
world.Reboot()



for(var/mob/nonit/M in world)
if(M)
if(M.cfrozen)
frost += M
for(var/mob/itnon/B in world)
if(B)
if(B.cfrozen)
frost += B
GameOver()


I'm doing it like that.
In response to DeathAwaitsU
  1. Those for()s just don't make sense: they don't do anything.
  2. If if(end) returns true, it will go through the if procedure, but it won't stop after that. If you wanted it to, you would call return. Either way, it doesn't matter what end is equal to since neither of those for()s do anything.
  3. mob/nonit? mob/itnon? mob/var/cfrozen? What?
  4. Always end your HTML tags.
  5. It seems like end is supposed to be a boolean variable.
  6. I still hate the idea of rebooting to end a round.
  7. This is a simplified version of your proc. I'm not sure if this is exactly what you want it to do, but as of now, this is exactly what your proc is doing. Whether end is equal to 1 or to 0 is irrelevant in your version, so I've removed it.
    proc/GameOver()
    world << "<font size=4><b>Everyone is frozen! Rebooting!</b></font size=4>"
    sleep(100)
    world.Reboot()
In response to Wizkidd0123
Still crashing/not working.
If it helps, DS made a report in trace.txt about it crashing:

C:\Documents and Settings\tom\Desktop\dung\libdung\client\Ctick.cpp:163
msg type=30, length=0