Large

Ikariam Reloaded

By Buzzy Last update Feb 17, 2011 — Installed 164,981 times.

A issue with the distancies's calculator

in
Subscribe to A issue with the distancies's calculator 11 posts, 6 voices



Phénix User
FirefoxWindows

First, sorry for my bad english, i'm french.
So, the script has a problem...

On the map, if i want to calculate the distancie between a island and another island, by mouse's click, the script show....

NaNJ NaNh NaNm NaNs

and when i click on the right arrow for precisions, it's the same thing, NaNJ NaNh NaNm NaNs

Please fix this, thanks

 
Phénix User
FirefoxWindows

the issue is with the capital to a island. I just tried to calculate a colonie to a island, and it's work.

 
Buzzy Script's Author
FirefoxWindows

Have you visited all the cities?

 
Phénix User
FirefoxWindows

look: http://img517.imageshack.us/img517/4893/issue.png

 
Sebi57 User
FirefoxWindows

same problem with me (french too)

 
hockey guy User
FirefoxWindows

yea...kinda weird! Me too =P

 
Buzzy Script's Author
FirefoxWindows

Only in french server? Are they modifying the game?

 
Phénix User
FirefoxWindows

i don't think...

 
Phénix User
FirefoxWindows

The fuction work now... awesome!

 
RxR Scriptwright
FirefoxWindows

Hi, Buzzy,

I had the same issue with distance calculator. I tried everything - I disabled another scripts, I reinstalled IR, I unistalled (even with settings) and again installed IR. Nothing helped.

So I tried debug your script and I found that variable coordsInicio in function calcula is always undefined. So I defined global (i.e. outside of "calcula") variable coordsInicioRxR and I assigned it correct value in function panel (see bellow). Everything's working now.

	 /**
	 * Actualiza el tiempo cuando se selecciona una isla.
	 */

	var coordsInicioRxR = "";

	function calcula (){
		var nombreIsla = document.getElementById ("islandBread").childNodes[0].textContent;
		var coordsFinal = nombreIsla.split (" [")[1].replace ("]", "");
		var coordsInicio = coordsInicioRxR;

.
.
.

	/**
	 * Crea la calculadora normal.
	 */
	function panel (){
		var panel = document.createElement ("div");
		panel.id = "calcDistancia";
		panel.className = "dynamic";
		
		if (panelesScript[3] == "1"){
			var abierto = true;
			var imagen = Img.PANEL_BOTON_MINIMIZAR;
			var vis = "visible";
			var hei = "155px";
		}else{
			var abierto = false;
			var imagen = Img.PANEL_BOTON_MAXIMIZAR;
			var vis = "hidden";
			var hei = "0";
		}
		
		coordsInicioRxR = nombreIsla.split (" [")[1].replace ("]", "");

		panel.innerHTML =	"<h3 class='header'>" + Lang["timeTitle"] + "<img src='" + imagen + "' style='position: absolute; right: 5px; top: 7px; cursor: pointer;'/></h3>" +
							"<div class='content' style='visibility: " + vis + "; height: " + hei + ";'>" +
								"<img id='flechaCalculadora' src='" + Img.FLECHA_TIPO_3 + "' style='position: absolute; right: 0; top: -5px; cursor: pointer;'/>" +
								"<div style='text-align: center; width: 100px; position: relative; top: 10px;'>" +
									"<span style='font-weight: bold; font-size: 13px;'>" + coordsInicioRxR + "<span><br/>" +

 
penguana User
FirefoxWindows

thx RxR!! :D

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel