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__)));
}
Now I've got this:
Code: Select all
$challengeObj = $this->connection->getNextChallengeInfo();
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]);


...
Took a look at a way mlepp used it:
Code: Select all
$this->challengeData->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]);
.. 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.