Challenge data

Discuss the Dedicated Server Tools developed by Nadeo Live such as ManiaLive, Trust Circles, Dedicated Manager, Competition Manager and Lobbies

Moderator: NADEO

Post Reply
User avatar
TGYoshi
Posts: 795
Joined: 15 Mar 2011, 16:59

Challenge data

Post by TGYoshi »

I've found this:

Code: Select all

	/**
	 * Returns a struct containing the infos for the next challenge.
	 * The struct contains the following fields : Name, UId, FileName,
	 * Author, Environnement, Mood, BronzeTime, SilverTime, GoldTime,
	 * AuthorTime, CopperPrice, LapRace, NbLaps and NbCheckpoints.
	 * (NbLaps and NbCheckpoints are also present but always set to -1)
	 * @return Challenge
	 */
	function getNextChallengeInfo()
	{
		return Structures\Challenge::fromArray($this->execute(ucfirst(__FUNCTION__)));
	}
Great.
Now I've got this:

Code: Select all

$challengeObj = $this->connection->getNextChallengeInfo();
(thanks mlepp)

My awesome brain thinks I can use all those cool things from the fist snippet.
Trying:

Code: Select all

passthru('D:\UniServer\php\php.exe -f "D:\TM2\ManiaLive2_r255_beta\loadMX.php" '. [b]$challengeObj->UId[/b]);
UUMG ERROR "UId" DOES NOT EXISTTT :shock: :shock: .

...
Took a look at a way mlepp used it:

Code: Select all

$this->challengeData->name
WUUUUUUUUUUUUT? That seems to work. Without capital 'N' at 'name'. :?

Changing my own snippet to:

Code: Select all

passthru('D:\UniServer\php\php.exe -f "D:\TM2\ManiaLive2_r255_beta\loadMX.php" '. [b]$challengeObj->name[/b]);
works fine!
.. Except for the fact that I want the UId, as it sucks to have multiple words in a command and it's "haxx-able".


Someone explain please? The documentation is way too unclear.
=3
svens
Posts: 97
Joined: 15 Jun 2010, 11:06
Location: Bern, CH
Contact:

Re: Challenge data

Post by svens »

To solve that kind of problem, just var_dump($challengeObj)..

Aren't you supposed to use $this->storage->nextChallenge->uId for that kind of stuff? (Also note that only the i is capital.)
User avatar
TGYoshi
Posts: 795
Joined: 15 Mar 2011, 16:59

Re: Challenge data

Post by TGYoshi »

I've figured out this page:
http://api.manialive.com/ManiaLive/Dedi ... ummary.htm
a few minutes before you posted and so figured out it's uId..
Thanks anyway though. Forgot about var_dump :P.
=3
svens
Posts: 97
Joined: 15 Jun 2010, 11:06
Location: Bern, CH
Contact:

Re: Challenge data

Post by svens »

Documentation generated on Feb 24, 2011, 17:45:43 +0100 by PHP_UML
Just note that it's quite outdated. Looks like manialive keeps up Nadeo traditions when it comes to documentation.
User avatar
TGYoshi
Posts: 795
Joined: 15 Mar 2011, 16:59

Re: Challenge data

Post by TGYoshi »

Ehm, the stuff there is still valid, as far as I know ;). Or is there new stuff?
=3
User avatar
w1lla
Posts: 2287
Joined: 15 Jun 2010, 11:09
Location: Netherlands
Contact:

Re: Challenge data

Post by w1lla »

http://code.google.com/p/manialive/sour ... llenge.php

Otherwise try to see if these are ok.
TM² Info
SM Info
QM Info

OS: Windows 10 x64 Professional
MB: MSI 970A-G46
Processor: AMD FX-6300 3500 mHz
RAM Memory: 16 GB DDR3
Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
KB: Logitech G510s
Mouse: Logitech G300s
Mode Creation
ManiaScript Docs
svens
Posts: 97
Joined: 15 Jun 2010, 11:06
Location: Bern, CH
Contact:

Re: Challenge data

Post by svens »

TGYoshi wrote:Ehm, the stuff there is still valid, as far as I know ;). Or is there new stuff?
Maybe, but I wouldn't rely on it. Better look directly at the code, like w1lla suggested.

You can find some Easter eggs there.. Like this one:

Code: Select all

>php bootstrapper.php --help
[... Regular startup dialog ...]
SQLite is disable, threading will not work. ManiaLive may encounter some perfoma
nce trouble.ManiaMod - TrackMania Dedicated Manager v0.3 (2010 Aug 16)
Authors :
        Philippe "farfa" Melot, Maxime "Gouxim" Raoust, Florian "aseco" Schnell
Usage: php index.php [args]
[...]
So either no one looked through this file since last August or the guy simply didn't care. Which is both not so good :).
User avatar
TGYoshi
Posts: 795
Joined: 15 Mar 2011, 16:59

Re: Challenge data

Post by TGYoshi »

Still hard to find the correct file if you are just trying to start with Manialive ;).
=3
Post Reply

Return to “Dedicated Server Tools”

Who is online

Users browsing this forum: No registered users and 0 guests