forum.webdiplomacy.net

webDip dev coordination forum / public access todo list
It is currently Mon Nov 20, 2017 12:05 am

All times are UTC




Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Wed May 05, 2010 9:42 pm 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
If I load the following map, the order-generation stops to work:
http://oli.rhoen.de/webdiplomacy/variants.php#Rinascimento

any ideas, what's going wrong?

Oliver


Last edited by Sleepcap on Thu May 06, 2010 3:15 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Wed May 05, 2010 10:19 pm 
Offline

Joined: Wed Oct 08, 2008 12:47 pm
Posts: 726
Have you tried opening it with firebug & javascript Error console up?

Also, I know its the wrong thread, but feel free to email me/start a new thread with an explanation of the difficulties with the transiberian railroad if its still not done (thread might well be out of date)


Top
 Profile  
 
PostPosted: Thu May 06, 2010 7:15 am 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
figlesquidge wrote:
Have you tried opening it with firebug & javascript Error console up?

I tried firebug. He don't show an error, but the script (somehow) has difficulties with the convoy order generation. (it never reach the part after

And really strange error. After I load that map the order-generation works no longer for "normal" maps too...
Did have to reinstall webdiplomacy to make the other variants work again...

It stops in "loadModel()" after "if( context.phase == 'Diplomacy' )" in line 155.

Oliver


Top
 Profile  
 
PostPosted: Thu May 06, 2010 7:35 am 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
Sleepcap wrote:
It stops in "loadModel()" after "if( context.phase == 'Diplomacy' )" in line 155.


WRONG!
Sorry. Did a bit more research.
It stops in "loadBord();"

Code:
64 Units.values().map(function(f) {
65 if( f.type == 'Fleet' && f.Territory.type=='Sea' )
66 {
67 var CG=new ConvoyGroupClass();
68 CG.loadFleet(f);
69 CG.loadCoasts();
70 CGs.push(CG);
71 }
72 },this);


The function gets called a few times, but it looks like it never completes...

Oliver


Top
 Profile  
 
PostPosted: Thu May 06, 2010 10:33 am 
Offline

Joined: Wed Oct 08, 2008 12:47 pm
Posts: 726
Then I would suggest that you may have corrupted your order generation JSs


Top
 Profile  
 
PostPosted: Thu May 06, 2010 11:56 am 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
figlesquidge wrote:
Then I would suggest that you may have corrupted your order generation JSs

I didn't change anything there...
Any ideas what I should look for?

Oliver


Top
 Profile  
 
PostPosted: Thu May 06, 2010 1:06 pm 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
Could narrow the problem even more.
It looks like some units get a terrID, but the javascript-unit-object has no territory-object linked.

Or the territory for the problematic territories does not exists.
Could someone give me another hint where to look?

Oliver


Top
 Profile  
 
PostPosted: Thu May 06, 2010 1:22 pm 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
Looks like I have some more information.
The problem is in a country that has 4 fleets in the beginning and "no" home-SC and no occupied territory...

Oliver


Top
 Profile  
 
PostPosted: Thu May 06, 2010 3:15 pm 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
Looks like the problem is because I place units on "neutral" territories.
I have 2 other units in pregame that place on "neutral" territories that have a sc, but the territory should count as unoccupied.

Oliver


Top
 Profile  
 
PostPosted: Thu May 06, 2010 8:06 pm 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
Found the solution.
In pregame-adjucation assignTerritories() only add the non-neutral territories to the database.
That's a problem with units starting on Sea-territories, or "neutral" territories.

This solved the issue for me:
Code:
   protected function assignTerritories() {
      global $DB, $Game;
      $DB->sql_put(
         "INSERT INTO wD_TerrStatus ( gameID, countryID, terrID )
         SELECT ".$Game->id." as gameID, countryID, id
         FROM wD_Territories
         WHERE mapID=".$Game->Variant->mapID." AND
            (name='Bari' OR name='Pavia' OR name='East Gateway' OR
             name='Outer Ionian Sea'  OR name='Eastern Mediterranean Sea' OR 
             name='Arcipelago di Spalato');"
      );
      
      parent::assignTerritories();
      
   }
Oliver


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group