[Fixed] Valley rankings not working
Moderator: NADEO
[Fixed] Valley rankings not working
My code for getting the rankings for stadium,canyon and storm are working, but valley not?
Re: Valley rankings not working
What's wrong with it?
What error do you have?
On my side it's working fine:
What error do you have?
On my side it's working fine:
Code: Select all
http://ws.maniaplanet.com/valley/rankings/multiplayer/player/magnetik.org/
Code: Select all
Object
environment = Valley
unit = Ladder Points
points = 82.47
ranks = Array
[] => Object
idZone = 1
path = World
rank = 8245
[] => Object
idZone = 118644
path = World|Europe
rank = 6199
[] => Object
idZone = 2
path = World|Europe|France
rank = 1652
[] => Object
idZone = 49
path = World|Europe|France|Aquitaine
rank = 64
[] => Object
idZone = 211
path = World|Europe|France|Aquitaine|Gironde
rank = 35
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
Re: Valley rankings not working
Code: Select all
$MultiplayerCanyon = new \Maniaplanet\WebServices\Rankings\Canyon('*****', '*****');
$player = $MultiplayerCanyon->getMultiplayerPlayer($login);
$MultiplayerStorm = new \Maniaplanet\WebServices\Rankings\Storm('*****', '*****');
$player = $MultiplayerStorm->getMultiplayerPlayer($login);
$MultiplayerStadium = new \Maniaplanet\WebServices\Rankings\Stadium('*****', '*****');
$player = $MultiplayerStadium->getMultiplayerPlayer($login);
$MultiplayerValley = new \Maniaplanet\WebServices\Rankings\Valley('*****', '*****');
$player = $MultiplayerValley->getMultiplayerPlayer($login);
Code: Select all
Class 'Maniaplanet\WebServices\Rankings\Valley' not found
Re: Valley rankings not working
It looks like that you are using an old version of the SDK.
I suggest you to use latest version wich is way easier to use (only one class for all rankings).
I suggest you to use latest version wich is way easier to use (only one class for all rankings).
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
Re: Valley rankings not working
I am using 4.2 ?
Then either i am blind or the documentation is again not clear ...
Then either i am blind or the documentation is again not clear ...
Re: Valley rankings not working
You are using 4.2 but it looks like you kept old classes.
Current usage of rankings is :
Examples are up to date: https://code.google.com/p/maniaplanet-w ... nkings.php
Current usage of rankings is :
Code: Select all
$rankings = new \Maniaplanet\WebServices\Rankings($username, $password);
print_r($rankings->getMultiplayerWorld('SMStorm',0,2));
$rankings = new \Maniaplanet\WebServices\Rankings($username, $password);
print_r($rankings->getMultiplayerWorld('SMStormElite@nadeolabs',0,2));
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
Re: Valley rankings not working
ok, 2 questions:
old:
new:
Where is the $login ??
what does the 0,2 do/mean?
WW
old:
Code: Select all
$MultiplayerValley = new \Maniaplanet\WebServices\Rankings\Valley('*****', '*****');
$player = $MultiplayerValley->getMultiplayerPlayer($login);
Code: Select all
$rankings = new \Maniaplanet\WebServices\Rankings($username, $password);
print_r($rankings->getMultiplayerWorld('SMStorm',0,2));
Code: Select all
('SMStorm',0,2))
WW
- w1lla
- Posts: 2396
- Joined: 15 Jun 2010, 11:09
- Manialink: maniaplanetblog
- Location: Netherlands
- Contact:
Re: Valley rankings not working
(0,2);
Offset, Length.
What you might need is getMultiplayerPlayer('titleID', 'Login');
where titleID =
Offset, Length.
What you might need is getMultiplayerPlayer('titleID', 'Login');
where titleID =
Code: Select all
case 'SMStorm':
return '/storm';
case 'TMCanyon':
return '/canyon';
case 'SMStormRoyal@nadeolabs':
return '/royal';
case 'TMStadium':
return '/stadium';
case 'SMStormElite@nadeolabs':
return '/elite';
case 'TMValley':
return '/valley';
default:
return '/titles';
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
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
- Rots
- Translator
- Posts: 1165
- Joined: 01 Sep 2010, 14:39
- Manialink: revival
- Location: España, Barcelona
Re: Valley rankings not working
That's it. This is the way it is working for me.
getMultiplayerWorld('title',offset,length) gives the global rankings for the specified attributes
getMultiplayerWorld('title',offset,length) gives the global rankings for the specified attributes
Who is online
Users browsing this forum: No registered users and 0 guests