Page 10 of 10

Re: Script callbacks

Posted: 16 Aug 2014, 20:27
by undef.de
The Maniaplanet Beta forum has been moved to: http://forum.maniaplanet.com/viewforum.php?f=481

Re: Script callbacks

Posted: 29 Aug 2014, 20:21
by oliverde8
Still having all calbacks in one place would be nice.
and it seems Rounds_SetPointsRepartition & Rounds_GetPointsRepartition don't work.

whatever I do Rounds_GetPointsRepartition returns "1" just that nothing else even throught points repartition is still at default. while Rounds_SetPointsRepartition seems to do nothing.

While at it, we still can't change script modes.

Of course all this in Trackmania Rounds mode.

Re: Script callbacks

Posted: 29 Aug 2014, 23:13
by undef.de
oliverde8 wrote:and it seems Rounds_SetPointsRepartition & Rounds_GetPointsRepartition don't work.

whatever I do Rounds_GetPointsRepartition returns "1" just that nothing else even throught points repartition is still at default. while Rounds_SetPointsRepartition seems to do nothing.
I have noticed, that on controller start Rounds_SetPointsRepartition seems only to set the given Pointslimit, when a Player is connected. And sometimes it seems to do not set the Pointslimit at all, but Rounds_GetPointsRepartition returns the given ones, but i currently didn't have figured out when and why...

You have to call it likes this way to get it to work the most times:

Code: Select all

$points = array('10', '6', '4', '3', '2', '1');
$aseco->client->query('TriggerModeScriptEventArray', 'Rounds_SetPointsRepartition', $points);
oliverde8 wrote: While at it, we still can't change script modes.
Yes... a pain in the a.... ahm... face. ;)

Re: Script callbacks

Posted: 30 Aug 2014, 09:08
by oliverde8
Hi, thanks

Actually I was using the getPointsLimit to check if the set worked, so the set did work yesterday at some point XD. I leave this why waiting for more information :)

Re: Script callbacks

Posted: 08 Sep 2014, 15:10
by Eole
kremsy wrote:The ManiaPlanet Beta forums are not existing anymore, you had the newest verison of callbacks there, can you update them here as well or update the docs: http://doc.maniaplanet.com/dedicated-se ... ripts.html I think you added the Uid to the BeginMap and some other things ;).
I fixed the link to the documentation on the first page. It should be up to date already. The Uid was listed in the BeginMap callback, do you see something else missing?

@Oliderde8 and undef.de :
You can try the files from this commit, it should fix the problems with Rounds_SetPointsRepartition & Rounds_GetPointsRepartition. They worked only when a round was running, now they should work anytime.

Re: Script callbacks

Posted: 08 Sep 2014, 21:01
by undef.de
Eole wrote: @Oliderde8 and undef.de :
You can try the files from this commit, it should fix the problems with Rounds_SetPointsRepartition & Rounds_GetPointsRepartition. They worked only when a round was running, now they should work anytime.
I got

Code: Select all

[2014/09/08 21:48:43] Script compilation failed: ERROR[Modes/TrackMania/ModeBase.Script.txt : 528, 9] Incorrect arguments to call the function BeginMatch
Script compilation failed.
because of XmlRpc.Script.txt

Code: Select all

Void BeginMatch(Integer _Number)
but called

Code: Select all

XmlRpc::BeginMatch(MB_SectionMatchNb, MB_MapRestarted);
If i change [528, 9] to

Code: Select all

XmlRpc::BeginMatch(MB_SectionMatchNb);
then it seems to runs fine.
But i don't know if you have just forgot to add a changed XmlRpc.Script.txt, or if this was a copy'n'paste fail. :mrgreen:

EDIT: Just read the updated doc at 'LibXmlRpc_BeginMatch' and now it seems you have forgot to commit a changed XmlRpc.Script.txt for this fix, like this:

Code: Select all

// ---------------------------------- //
/** Callback sent at the beginning of the match
 *	Data:
 *	[Number of the match, Map restarted]
 */
Void BeginMatch(Integer _Number, Boolean _Restarted) {
	if (!G_UseLibXmlRpc) return;

	declare Restarted = "False";
	if (_Restarted) Restarted = "True";
	Private_SendCallbackArray("LibXmlRpc_BeginMatch", [TL::ToText(_Number), Restarted]);
}

Re: Script callbacks

Posted: 09 Sep 2014, 13:54
by Eole
Ooops, sorry. Indeed you also have to get the XmlRpc.Script.txt library on GitHub.