|
|
|
|
|
October 31st, 2006, 03:25 PM
|
Sergeant
|
|
Join Date: Feb 2001
Location: Belmont, CA USA
Posts: 285
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Space Empires V Editor 1.0 released
Quote:
Elsemeravin said:
I think I got it. My computer has is expecting ',' as decimal separator instead of '.' and then when your program meets a decimal number in formula it will not process correctly.
But I'm not sure if you could force the decimal separator in your code to be '.' instead of windows default one ?
|
Oh! Heh, fancy programming bites me in the ***, I see. I was trying to be "smart" and have the formula parser recognize regional settings. Obviously, I need to rethink that and turn that off
Thanks for finding this!
|
October 31st, 2006, 03:55 PM
|
Corporal
|
|
Join Date: Nov 2001
Posts: 148
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Space Empires V Editor 1.0 released
Quote:
Devnullicus said:
Oh! Heh, fancy programming bites me in the ***, I see. I was trying to be "smart" and have the formula parser recognize regional settings. Obviously, I need to rethink that and turn that off
|
Don't worry too much, I changed the regional setting to use '.' I should have done that long time ago already, so now it's done for good.
I think you should focus on component design first (and then tech areas ! with a nice tree representation)
|
October 31st, 2006, 04:22 PM
|
Private
|
|
Join Date: May 2001
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Space Empires V Editor 1.0 released
Fyron,
Thanx for the response.
I'll take a look at the moon offset / same as idea.
The idea of creating planets in SE with 10+ moons (like those in our own solar system) has always intrigued me.
I like the idea of colonizing the moons, building cargo facilities and filling them with weapons platforms for planetary defense. However, this makes no sense if the moons are in a different sector.
An editor tool for the SEV map files (similar to DevNull's facilities editor) would be very useful as the text files are pretty complicated.
Thanx,
skigrinder
|
November 2nd, 2006, 02:03 AM
|
Sergeant
|
|
Join Date: Feb 2001
Location: Belmont, CA USA
Posts: 285
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Space Empires V Editor 1.0 released
Elsemeravin: I'm trying to fix the error you (and others) have gotten with regional settings. However, I can't seem to reproduce the error on my computer. What are your regional settings (i.e. what did you change to make the problem go away, and what was the old value that was causing the problem)?
|
November 2nd, 2006, 04:21 AM
|
Corporal
|
|
Join Date: Nov 2001
Posts: 148
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Space Empires V Editor 1.0 released
In the national setting from configuration panel, go to customise button (right of national name), then change the decimal separator (sorry I don't remember the exact name for the english version), and change from '.' to ','.
Then apply.
|
November 2nd, 2006, 05:11 AM
|
Sergeant
|
|
Join Date: Feb 2001
Location: Belmont, CA USA
Posts: 285
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Space Empires V Editor 1.0 released
ok, got it. Man, what a pain in the ***. Turns out I was correctly NOT using regional settings when parsing the formula, BUT C# was using them anyway when doing a Convert. So, it was doing very strange things with . and , characters when the regional settings were different.
The fix was to just set the app settings to en-US Number Formatting. Figuring out how to DO that, however, was a real pain in the ***. Ah well, it should work now.
Just in case any other C# programmers want to know how to force an application to use US number formatting no matter what the user's regional settings are, here's some code
Code:
CultureInfo currentCultureInfo = Thread.CurrentThread.CurrentCulture;
CultureInfo cultureInfo = (CultureInfo)currentCultureInfo.Clone();
NumberFormatInfo nfi = new CultureInfo( "en-US", false ).NumberFormat;
cultureInfo.NumberFormat = nfi;
Thread.CurrentThread.CurrentCulture = cultureInfo;
Wouldn't be nearly so annoyingly difficult to figure out if the system didn't make the original settings read-only so that I had to clone them. Sheesh.
|
November 2nd, 2006, 06:08 PM
|
Corporal
|
|
Join Date: Nov 2001
Posts: 148
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Space Empires V Editor 1.0 released
Now that you solved this problem what about the component editor ?
|
November 2nd, 2006, 06:12 PM
|
National Security Advisor
|
|
Join Date: Nov 2000
Posts: 5,085
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Space Empires V Editor 1.0 released
__________________
Phoenix-D
I am not senile. I just talk to myself because the rest of you don't provide adequate conversation.
- Digger
|
November 2nd, 2006, 06:14 PM
|
Sergeant
|
|
Join Date: Feb 2001
Location: Belmont, CA USA
Posts: 285
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Space Empires V Editor 1.0 released
|
November 2nd, 2006, 07:07 PM
|
Corporal
|
|
Join Date: Nov 2001
Posts: 148
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Space Empires V Editor 1.0 released
So next step:
"Now that the component editor is done, what about the tech tree editor ?"
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|