Script callbacks

Moderator: NADEO

User avatar
undef.de
Posts: 2095
Joined: 06 Apr 2011, 21:57
Location: Germany, North Sea Coast
Contact:

Re: Script callbacks

Post by undef.de »

The Maniaplanet Beta forum has been moved to: http://forum.maniaplanet.com/viewforum.php?f=481
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.
oliverde8
Posts: 1345
Joined: 16 Jun 2010, 07:33
Location: in a Blue Box

Re: Script callbacks

Post 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.
Image
Developper for The next generation, Clean and Powerfull controller eXpansion for your SM & TM server . Working on eXpansion² with full MP4 support and many other awesome features...
User avatar
undef.de
Posts: 2095
Joined: 06 Apr 2011, 21:57
Location: Germany, North Sea Coast
Contact:

Re: Script callbacks

Post 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. ;)
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.
oliverde8
Posts: 1345
Joined: 16 Jun 2010, 07:33
Location: in a Blue Box

Re: Script callbacks

Post 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 :)
Image
Developper for The next generation, Clean and Powerfull controller eXpansion for your SM & TM server . Working on eXpansion² with full MP4 support and many other awesome features...
User avatar
Eole
Nadeo
Nadeo
Posts: 1265
Joined: 26 Apr 2011, 21:08

Re: Script callbacks

Post 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.
Contribute to the ManiaPlanet documentation on GitHub
A question about ManiaScript? Ask it here!
User avatar
undef.de
Posts: 2095
Joined: 06 Apr 2011, 21:57
Location: Germany, North Sea Coast
Contact:

Re: Script callbacks

Post 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]);
}
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.
User avatar
Eole
Nadeo
Nadeo
Posts: 1265
Joined: 26 Apr 2011, 21:08

Re: Script callbacks

Post by Eole »

Ooops, sorry. Indeed you also have to get the XmlRpc.Script.txt library on GitHub.
Contribute to the ManiaPlanet documentation on GitHub
A question about ManiaScript? Ask it here!
Post Reply

Return to “Dedicated Server”

Who is online

Users browsing this forum: No registered users and 1 guest