Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2002:
[Freeciv-Dev] Re: tradesize variables (PR#1488)
Home

[Freeciv-Dev] Re: tradesize variables (PR#1488)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: tradesize variables (PR#1488)
From: Christian Knoke <chrisk@xxxxxxxx>
Date: Sat, 1 Jun 2002 13:54:21 -0700 (PDT)

On Sat, Jun 01, 2002 at 01:29:10PM -0700, Per I Mathisen wrote:
> On Wed, 22 May 2002, Christian Knoke wrote:
> > > set notradesize 3
> > > set fulltradesize 5
> >
> > The first statement is rejected with an error message,
> > because notradesize > fulltradesize. You don't expect this,
> > it is the only interdepency between variable assignments.
> >
> > I suggest, just allow the first statement, and give fulltradesize
> > dominance, that is, if notradesize > fulltradesize, just ignore
> > notradesize. Change the help text to reflect this.
> 
> This is hard to fix because of the rigid way the options are parsed. The
> simplest way to fix it would be to unify the above into one command which
> takes two arguments
> 
>       tradesize <notrade> <fulltrade>
> 
> Is this an okay solution?

I think so.

> 
> In any case, I do not think this is a release critical bug. It is merely a
> bit annoying for those who want to use it, the first time. And hardly
> anyone will try it anyway.

Well, at least I tried it several times, until I found why it didn't
work.

> 
> > Also note, if you issue the two statements above, and then:
> >
> > > write setting
> >
> > restart civserver, and:
> >
> > > read setting
> >
> > the result is:
> >
> > notradesize   +=0
> > fulltradesize + 5
> >
> > which is faulty.
> 
> Why? Looks alright to me.

It is not. What is saved is not what you get when you read it in.
I.e. you can't read non-default settings for the notradesize variable,
because fulltradesize == 1 at the time it is parsed.

> Yours,
> Per

Christian

-- 
Christian Knoke     * * *      http://www.enter.de/~c.knoke/
* * * * * * * * *  Ceterum censeo Microsoft esse dividendum.




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