forum.webdiplomacy.net
http://forum.webdiplomacy.net/

How do you install Variants?
http://forum.webdiplomacy.net/viewtopic.php?f=10&t=830
Page 1 of 1

Author:  mikesla [ Mon Jan 02, 2012 10:39 pm ]
Post subject:  How do you install Variants?

Hi.

I have spent a bit making sure this hasn't been posted (curious to see it hasn't), must be easy to install.

I just installed the latest version of webdip, and I am wishing to install a few extra variants. So far I am having no luck installing them.

I have placed the variants I wish to add to the game in the variants directory, and they are not showing up in the game list to play.

I know I am doing something wrong here. If anyone can give some pointers I would really appreciate it. :)

Cheers.

Author:  Sleepcap [ Mon Jan 02, 2012 10:42 pm ]
Post subject:  Re: How do you install Variants?

There is a line in config.php where you need to add them.

Author:  mikesla [ Mon Jan 02, 2012 10:55 pm ]
Post subject:  Re: How do you install Variants?

Sleepcap wrote:
There is a line in config.php where you need to add them.


Haaaa, thanks..

I have just came across a critical error when I tried HELP, and variants.

Error triggered: file_exists() [function.file-exists]: open_basedir restriction in effect. File(variants/install.php/variant.php) is not within the allowed path(s): (/home/[hidden]:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp)

Error: "file_exists() [function.file-exists]: open_basedir restriction in effect. File(variants/install.php/variant.php) is not within the allowed path(s): (/home/[hidden]:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp)"
Raised: "/home/[hidden]/public_html/webdip/variants.php"
Line: "37"

Ouch!

Author:  firdrak [ Mon Jun 11, 2012 9:22 am ]
Post subject:  Re: How do you install Variants?

I tried to add AnarchyInUK as variant, I added to the config and put the files in but get this error:
Error: "Undefined index: 4"
Raised: "C:\Users\Amison\Documents\David\xampp\htdocs\Diplomacy\objects\game.php"
Line: "300"
userID = 5Variable dump: row => Array: (
id => 2
variantID => 4
password =>
turn => 0
phase => Pre-game
processTime => 1339492500
name => Anarchy
gameOver => No
attempts => 0
pot => 0
potType => Points-per-supply-center
phaseMinutes => 1440
processStatus => Not-processing
pauseTimeRemaining =>
minimumBet => 10
anon => No
pressType => Regular
missingPlayerPolicy => Normal
)
name => missingPlayerPolicy
value => Normal

Author:  firdrak [ Mon Jun 11, 2012 1:43 pm ]
Post subject:  Re: How do you install Variants?

I think I know what the error is, it would seem that the lab is set up differently to they normal code, so where I have been coding it like this:
Code:
array('North Atlantic', 'Sea', 'No', 0, 91, 198, 52, 185),

I should have been coding it like this:
Code:
array('Lusitania', 'Land', 'No',40, 280, 20, 135,'Neutral'  ,'No' ),


Is there any quick way to get it to work without redoing all the coding?

Author:  Sleepcap [ Mon Jun 11, 2012 6:35 pm ]
Post subject:  Re: How do you install Variants?

firdrak wrote:
I think I know what the error is, it would seem that the lab is set up differently to they normal code, so where I have been coding it like this:
Code:
array('North Atlantic', 'Sea', 'No', 0, 91, 198, 52, 185),

I should have been coding it like this:
Code:
array('Lusitania', 'Land', 'No',40, 280, 20, 135,'Neutral'  ,'No' ),


No, the lab works exactly the same as the vDip-server. (It's the same web-directory, just a different config-file).
In the install.php right after the territories-definition there is a line of code:
Code:
   list($name, $type, $supply, $x, $y, $sx, $sy, $country)=$territoryRawRow;

This is the way your data is assigned to the different varianbles.
Your data provided need to match this (or you need to change this line to match your data).
You should download your variant from the lab and compare the code with your local copy.

Oliver

Author:  firdrak [ Tue Jun 12, 2012 10:41 am ]
Post subject:  Re: How do you install Variants?

I have checked that but still get this error:
Quote:
Error: "Undefined index: 4"
Raised: "C:\Users\Amison\Documents\David\xampp\htdocs\Diplomacy\objects\game.php"
Line: "300"
userID = 5Variable dump: row => Array: (
id => 2
variantID => 4
password =>
turn => 0
phase => Pre-game
processTime => 1339492500
name => Anarchy
gameOver => No
attempts => 0
pot => 0
potType => Points-per-supply-center
phaseMinutes => 1440
processStatus => Not-processing
pauseTimeRemaining =>
minimumBet => 10
anon => No
pressType => Regular
missingPlayerPolicy => Normal
)
name => missingPlayerPolicy
value => Normal

Author:  Sleepcap [ Tue Jun 12, 2012 6:06 pm ]
Post subject:  Re: How do you install Variants?

Looks like you use a different variantID in config.php and variant.php

Author:  firdrak [ Wed Jun 13, 2012 10:57 am ]
Post subject:  Re: How do you install Variants?

Thanks that makes sense when I think about it. Now the maps show up how I have drawn them? I have made sure they are in indexed mode but still not working.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/