dedicps tracking

UASECO is a fork of the XAseco2/1.03 controller for Trackmania and has been overhauled to support the Modescript Gamemodes of Trackmania².

Moderators: undef.de, NADEO

Post Reply
aca
Posts: 44
Joined: 02 May 2014, 14:25
Location: Passau

dedicps tracking

Post by aca »

Hello undef,

I wondered, why I couln't switch from lokal-cp-tracking (/cps) to dedi-cp-tracking (/dedicps) and found when using /dedicps the following PHP-warning in my logs:
[PHP Warning] end() expects parameter 1 to be array, string given on line 1207 in file /uaseco/plugins/plugin.checkpoints.php

I think I fixed this (switching now works for me and no more warning) by inserting a line in the plugin.checkpoints.php in line 1201:

Code: Select all

$current['Checks'] = explode(',',$current['Checks']); 
The whole part (between line 1195 and 1221) now looks like this:

Code: Select all

		else if ($this->checkpoints[$login]->tracking['dedimania_records'] == 0 && isset($aseco->plugins['PluginDedimania']) && isset($aseco->plugins['PluginDedimania']->db['Map']) && isset($aseco->plugins['PluginDedimania']->db['Map']['Records']) && !empty($aseco->plugins['PluginDedimania']->db['Map']['Records'])) {
			// Search for own/last record
			$record = 0;
			$current = false;
			while ($record < count($aseco->plugins['PluginDedimania']->db['Map']['Records'])) {
				$current = $aseco->plugins['PluginDedimania']->db['Map']['Records'][$record++];
				$current['Checks'] = explode(',',$current['Checks']);
				if ($current['Login'] == $login) {
					break;
				}
			}

			// Check for valid checkpoints
			if (!empty($current['Checks']) && $current['Best'] == end($current['Checks'])) {
				$this->checkpoints[$login]->best['finish'] = (int)$current['Best'];
				$this->checkpoints[$login]->best['cps'] = $current['Checks'];
			}

			// Send Widget
			if ($current['Login'] == $login) {
//				$this->buildTimeDiffWidget($login, '$<$NPersonal Best$>', true);
				$this->buildTimeDiffWidget($login, '$<$NOwn '. $record .'. Dedimania Record$>', false);
			}
			else {
				$this->buildTimeDiffWidget($login, '$<$N'. $record .'. Dedimania Record$>', false);
			}
		}
Hope this is ok. Greetz, aca
User avatar
undef.de
Posts: 2095
Joined: 06 Apr 2011, 21:57
Location: Germany, North Sea Coast
Contact:

Re: dedicps tracking

Post by undef.de »

Added to the to do list and will be fixed in the next update. :thumbsup:
Developer of UASECO, a controller with support of the Modescript Gamemodes for TM².
Visit the official website for more: UASECO.org


Developer of various plugins for XAseco/XAseco2 and MPAseco, visit my lab: www.undef.name

You like what I do? Then award a ManiaStar.
hackie
Posts: 1178
Joined: 19 Jul 2012, 22:43

Re: dedicps tracking

Post by hackie »

undef.de wrote: 13 Mar 2018, 19:26 Added to the to do list and will be fixed in the next update. :thumbsup:

next update , that sounds sooooo exited. :roflol:
System Specs:
OS: Windows 7 Professionnal x64
CPU: Intel Core i7-6700K / 4 GHz - 8 MB cache
GPU: MSI GTX 980TI GAMING 6G - OC Edition
Motherboard: ASUS MAXIMUS VIII RANGER
RAM : 32Gb Kingston HyperX Savage - DDR4
DirectX 11
User avatar
undef.de
Posts: 2095
Joined: 06 Apr 2011, 21:57
Location: Germany, North Sea Coast
Contact:

Re: dedicps tracking

Post by undef.de »

There is already an new update planned:
When it's done. 8-)
Developer of UASECO, a controller with support of the Modescript Gamemodes for TM².
Visit the official website for more: UASECO.org


Developer of various plugins for XAseco/XAseco2 and MPAseco, visit my lab: www.undef.name

You like what I do? Then award a ManiaStar.
hackie
Posts: 1178
Joined: 19 Jul 2012, 22:43

Re: dedicps tracking

Post by hackie »

undef.de wrote: 14 Mar 2018, 19:23 There is already an new update planned:
When it's done. 8-)
Nice ! :pil
System Specs:
OS: Windows 7 Professionnal x64
CPU: Intel Core i7-6700K / 4 GHz - 8 MB cache
GPU: MSI GTX 980TI GAMING 6G - OC Edition
Motherboard: ASUS MAXIMUS VIII RANGER
RAM : 32Gb Kingston HyperX Savage - DDR4
DirectX 11
endbase
Posts: 483
Joined: 26 Jun 2011, 19:34

Re: dedicps tracking

Post by endbase »

undef.de wrote: 14 Mar 2018, 19:23 There is already an new update planned:
When it's done. 8-)
Nice to hear undef :) :thumbsup:
aca
Posts: 44
Joined: 02 May 2014, 14:25
Location: Passau

Re: dedicps tracking

Post by aca »

forgot to check whether it is already an array :oops:

code must look like this:

Code: Select all

			if(!is_array($current['Checks'])){
					$current['Checks'] = explode(',',$current['Checks']);
			}
and has to be inserted in line 1186 and in the previous mentioned line
User avatar
undef.de
Posts: 2095
Joined: 06 Apr 2011, 21:57
Location: Germany, North Sea Coast
Contact:

Re: dedicps tracking

Post by undef.de »

Will be fixed in 0.9.6 release.
Developer of UASECO, a controller with support of the Modescript Gamemodes for TM².
Visit the official website for more: UASECO.org


Developer of various plugins for XAseco/XAseco2 and MPAseco, visit my lab: www.undef.name

You like what I do? Then award a ManiaStar.
Post Reply

Return to “UASECO”

Who is online

Users browsing this forum: No registered users and 5 guests