Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2002:
[Freeciv-Dev] Re: CivServer: start / end command (PR#1786)
Home

[Freeciv-Dev] Re: CivServer: start / end command (PR#1786)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: DHerding@xxxxxx
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: CivServer: start / end command (PR#1786)
From: Reinier Post <rp@xxxxxxxxxx>
Date: Sun, 21 Jul 2002 15:40:33 +0200

On Sat, Jul 20, 2002 at 03:27:31PM -0700, DHerding@xxxxxx wrote:
> Full_Name: Daniel Herding
> Version: 1.13.0
> Distribution: Windows binary
> Client: Both (or N/A)
> OS: Windows 98
> Submission from: (NULL) (217.83.108.157)
> 
> 
> I did the following:
> 
> Started CivServer.exe
> 
> Started CivClient.exe, connected to the server on localhost:5555
> 
> Typed 'start' to the server console
> 
> Selected Nation
> 
> Typed 'end' to the server console
> 
> Then I typed 'start' again, but the server responded
> "Spiel kann nicht gestartet werden: es läuft bereits."
> (Can't start game, it's already running)
>
> I typed 'end', the server responded
> "Spiel kann nicht beendet werden, da kein Spiel läuft."
> (Can't end game because no game is running)

A better message would be
 "Spiel kann nicht beendet werden, da es schon beendet ist."
 (Can't end game because it has already ended.)

You can't start a game once a game has been started before because
nobody has checked the code to free all the allocated data structures
created once the game starts, and to make sure a second game_init()
actually reinitialises everything properly.  (Perhaps some code relies
on the initial zero value of statically allocated data.  I love C.)

This is also the reason you can't load a game into a running server.

In your case, you did start the game, so there is no easy workaround:
the check has to be made before we know it's safe to start again.

That's true, it is in 'ended' status.

> Had to restart the server to start a new game. Seems like a bug to me...

It is in the FAQ, currently at http://www.freeciv.org/faq/#QA12

-- 
Reinier


[Prev in Thread] Current Thread [Next in Thread]