Problem with 0.663 create_universe_php

Trying to install BNT? No guarantees we can help you (especially if you're hosting it on windows) but we''ll try.

Post Reply
PMV
Posts: 2
Joined: Sat May 03, 2014 1:24 am

Problem with 0.663 create_universe_php

Post by PMV » Sat May 03, 2014 1:56 am

Hello, I used to play an older version a long time ago. I decided to give this game a try again to test out a local development server that I have recently set up to learn php. The setup works great until I reach this point:

Setting up Sectors --- STAGE 4
Creating Sol sector Created
Converting Sol Sector Id to 0 True
Creating Alpha Centauri in sector 1 Created
Inserting loop 1 of 3 Sector Block [2 - 499] into the Universe. Inserted
Inserting loop 2 of 3 Sector Block [500 - 999] into the Universe. Inserted
Inserting loop 3 of 3 Sector Block [1000 - 999] into the Universe. Inserted
Setting up Zone (Unchartered space) Set
Setting up Zone (Federation space) Set
Setting up Zone (Free-Trade space) Set
Setting up Zone (War Zone) Set
Setting up the 25 Federation Sectors Set
Loop 1 of 1 (Setting up Special Ports) Port [2 - 50] Selected
Loop 1 of 2 (Setting up Ore Ports) Block [1 - 500] Selected
Loop 2 of 2 (Setting up Ore Ports) Block [501 - 1000] Failed
Loop 1 of 2 (Setting up Organics Ports) Block [1 - 500] Failed
Loop 2 of 2 (Setting up Organics Ports) Block [501 - 750] Failed
Loop 1 of 2 (Setting up Goods Ports) Block [1 - 500] Failed
Loop 2 of 2 (Setting up Goods Ports) Block [501 - 1000] Failed
Loop 1 of 2 (Setting up Energy Ports) Block [2 - 500] Failed
Loop 2 of 2 (Setting up Energy Ports) Block [501 - 750] Failed

Each one of those failed errors gives me the same issue:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') or (port_type='none' and sector_id=) or (port_type='none' and sector_id=) or (' at line 1

Googling the error gave me a link to a forum thread on here, but due to the wipe, it has been lost. :(

Could I get some advice on how I (and possibly others with the same issue) could go about fixing this, or what I'm doing wrong?

EDIT: Forgot to mention, the server is using ubuntu 14.04 LTS + LAMP

Thanks :)

User avatar
TheMightyDude
Site Admin
Posts: 243
Joined: Thu Apr 17, 2014 10:15 am

Re: Problem with 0.663 create_universe_php

Post by TheMightyDude » Sat May 03, 2014 10:57 am

Can you try the default settings for Create Universe.
It seems to me by looking at the information that you provided that your trying to insert too many ports into the universe.

For a universe size of 1,000 Sectors its best practice to have the following Port Types:
10 Special Ports (1 %) [set to 1]
150 Ore Ports (15 %) [set to 15]
100 Organics Ports (10 %) [set to 10]
150 Goods Ports (15 %) [set to 15]
100 Energy Ports (10 %) [set to 10]
Totalling 510 ports. (51 % of sectors with the above ports in)
And 490 sectors (49 %) without ports in them.

Which was probably why yours failed on Loop 2 of 2 for the setting up of Ore Ports due to already filled up all the sectors and had run out of sector_id's of sectors with no ports in.

You had set the following:
50 Special Ports (5 %)
1,000 Ore Ports (100 %)
750 Organics Ports (75 %)
1,000 Goods Ports (100 %)
750 Energy Ports (75 %)
Totalling 3,550 Ports all into a universe of 1,000 Sectors.
A Sector can only either have a maximum of 1 port or can be empty i.e. none.


Try my suggested settings and let us know if that sorted it.
TheMightyDude::Blacknova Development.
Development Blog Twitter Twitch

PMV
Posts: 2
Joined: Sat May 03, 2014 1:24 am

Re: Problem with 0.663 create_universe_php

Post by PMV » Sat May 03, 2014 8:39 pm

Thanks for your speedy response. :)

Sorry, I forgot to mention, this should have been generated on an 8000 sector game. At least that's what I had put in the first dialog.

Default settings worked. Changing it from 1000 to 8000 on "Create Universe [Sector/Link Setup] --- Stage 1" causes the error.

However, reading: Inserting loop 3 of 3 Sector Block [1000 - 999] into the Universe. Inserted

Tells me it didn't actually insert more then 1000 sectors. Good catch, I didn't get it myself. So that might be where the issue lies after all. :)

Stage 2 tells me:

Create Universe Confirmation [So you would like your 1000 sector universe to have:] --- Stage2
Special ports 80
Ore ports 1200
Organics ports 800
Goods ports 1200
Energy ports 800
Initial commodities to sell 100.00%
Initial commodities to buy 100.00%
Empty sectors 3920
Federation sectors 5
Loops 2
Unowned planets 800


Which is setting to 8000 sectors, but default settings on everything else.

I changed it within config.php and:

Setting up Sectors --- STAGE 4
Creating Sol sector Created
Converting Sol Sector Id to 0 True
Creating Alpha Centauri in sector 1 Created
Inserting loop 1 of 17 Sector Block [2 - 499] into the Universe. Inserted
Inserting loop 2 of 17 Sector Block [500 - 999] into the Universe. Inserted
Inserting loop 3 of 17 Sector Block [1000 - 1499] into the Universe. Inserted
Inserting loop 4 of 17 Sector Block [1500 - 1999] into the Universe. Inserted
Inserting loop 5 of 17 Sector Block [2000 - 2499] into the Universe. Inserted
Inserting loop 6 of 17 Sector Block [2500 - 2999] into the Universe. Inserted
Inserting loop 7 of 17 Sector Block [3000 - 3499] into the Universe. Inserted
Inserting loop 8 of 17 Sector Block [3500 - 3999] into the Universe. Inserted
Inserting loop 9 of 17 Sector Block [4000 - 4499] into the Universe. Inserted
Inserting loop 10 of 17 Sector Block [4500 - 4999] into the Universe. Inserted
Inserting loop 11 of 17 Sector Block [5000 - 5499] into the Universe. Inserted
Inserting loop 12 of 17 Sector Block [5500 - 5999] into the Universe. Inserted
Inserting loop 13 of 17 Sector Block [6000 - 6499] into the Universe. Inserted
Inserting loop 14 of 17 Sector Block [6500 - 6999] into the Universe. Inserted
Inserting loop 15 of 17 Sector Block [7000 - 7499] into the Universe. Inserted
Inserting loop 16 of 17 Sector Block [7500 - 7999] into the Universe. Inserted
Inserting loop 17 of 17 Sector Block [8000 - 7999] into the Universe. Inserted
Setting up Zone (Unchartered space) Set
Setting up Zone (Federation space) Set
Setting up Zone (Free-Trade space) Set
Setting up Zone (War Zone) Set
Setting up the 40 Federation Sectors Set
Loop 1 of 1 (Setting up Special Ports) Port [2 - 80] Selected
Loop 1 of 2 (Setting up Ore Ports) Block [1 - 500] Selected
Loop 2 of 2 (Setting up Ore Ports) Block [501 - 1000] Selected
Loop 1 of 2 (Setting up Organics Ports) Block [1 - 500] Selected
Loop 2 of 2 (Setting up Organics Ports) Block [501 - 800] Selected
Loop 1 of 2 (Setting up Goods Ports) Block [1 - 500] Selected
Loop 2 of 2 (Setting up Goods Ports) Block [501 - 1000] Selected
Loop 1 of 2 (Setting up Energy Ports) Block [2 - 500] Selected
Loop 2 of 2 (Setting up Energy Ports) Block [501 - 800] Selected


So I believe the issue lies with create_universe.php not actually overwriting config.php's default value as stated.

thekabal
Posts: 91
Joined: Sat Apr 19, 2014 11:32 pm

Re: Problem with 0.663 create_universe_php

Post by thekabal » Sat May 03, 2014 10:40 pm

PMV wrote:So I believe the issue lies with create_universe.php not actually overwriting config.php's default value as stated.
Sadly, this is a known issue with that version. We redid the way create universe handles those variables in the latest SVN, but its not quite ready for prime time (release).

Thanks for the bug report!

User avatar
TheMightyDude
Site Admin
Posts: 243
Joined: Thu Apr 17, 2014 10:15 am

Re: Problem with 0.663 create_universe_php

Post by TheMightyDude » Sun May 04, 2014 6:43 am

Please don't set the sector size within Create Universe, you need to set it in the config.php file.
Look for $sector_max and change it from 1000 to the size that you want.

This will work.

Also the 1000 - 999 issue is a bug to do with the loops not working right.

*** Update ***
Missed what you said about the config file.
TheMightyDude::Blacknova Development.
Development Blog Twitter Twitch

hello_kitty
Posts: 3
Joined: Fri May 09, 2014 11:03 am

Re: Problem with 0.663 create_universe_php

Post by hello_kitty » Fri May 09, 2014 11:24 am

Thanks for help. It worked well.

Post Reply