[Solved] Bug ? Wrong server joined

Talk about ManiaLink development in this forum

Moderator: NADEO

Post Reply
BusardCendre
Posts: 174
Joined: 30 May 2013, 09:40

[Solved] Bug ? Wrong server joined

Post by BusardCendre »

Hi all,
I'm actually playing with manialink and maniascript to build a VioK's servers infos page and I found something really strange :

with this code :

Code: Select all

foreach (Event in PendingEvents) {
  if (Event.Type == CMlEvent::Type::MouseClick) {
    foreach (ServerId in G_ServersNames) {
      if (Event.Control.DataAttributeGet("servername") == ServerId) {
        log(ServerId);
        declare ServerLink = "maniaplanet://#join="^ServerId^"@"^C_InfosServers[ServerId][1];
        log (ServerLink);
        OpenLink(ServerLink, CMlScript::LinkType::Goto);
      }
    }
  }
}
this is the way I found to change the "manialink attribute" of a label ;-)

the 2 logs with my code are :
ServerId : ValleyVioK
ServerLink : maniaplanet://#join=ValleyVioK@TMValley

But then the game brings me to the server "Refuel VioK" which login is MicromachineValleyVioK and played on the title pack Trackmania_2@nadeolabs
If I write maniaplanet://#join=ValleyVioK@TMValley in the game browser, i'm redirected to the wrong server too !
:roflol:

thanks for help =)
Last edited by BusardCendre on 20 Sep 2016, 19:51, edited 1 time in total.
Image

CPU : AMD FX-4170 (4 CPUs, ~4.2 GHz)
GPU : Sapphire Radeon HD 7850, 2 Go , DX 11
RAM : 8 Go DDR3
Win 7 Ultimate x64
BusardCendre
Posts: 174
Joined: 30 May 2013, 09:40

Re: Bug ? Wrong server joined

Post by BusardCendre »

As it is possible to join our Valley server from multiplayer section of Valley title pack,
I suppose Nadeo wrote the code to join server in another way than what I did ...

could you please tell how you wrote it ? ;)
Image

CPU : AMD FX-4170 (4 CPUs, ~4.2 GHz)
GPU : Sapphire Radeon HD 7850, 2 Go , DX 11
RAM : 8 Go DDR3
Win 7 Ultimate x64
User avatar
noyranea
Nadeo
Nadeo
Posts: 187
Joined: 29 Apr 2014, 14:50
Location: Paris, France

Re: Bug ? Wrong server joined

Post by noyranea »

Hi there!

I tried joining your server with both a Manialink and the Maniaplanet browser, and I managed to reach the good server in both cases.
The join code you wrote seems fine. The join url "maniaplanet://#join=ValleyVioK@TMValley" joins the ValleyVioK server, and the following script code

Code: Select all

OpenLink("maniaplanet://#join=ValleyVioK@TMValley", CMlScript::LinkType::Goto);
joins the server as well.

My guess would be that something in your ManiaScript code messed your servernames up, but I can't be quite sure. I suggest you check your script for any errors, and come back here if the situation is still a mystery to you.

Have a nice day,

-- noyranea
BusardCendre
Posts: 174
Joined: 30 May 2013, 09:40

Re: Bug ? Wrong server joined

Post by BusardCendre »

thank you for the time you took to test it =)

It's ok I found my mistake ...

in fact, for my first tests, I used only two servers from Canyon title pack, so I wrote :

Code: Select all

declare ServerLink = "maniaplanet://#join="^ServerId^"@TMCanyon";
and I hadn't change it when I added some severs from other title packs :oops:
I had found my mistake before asking here,
but I hadn't saved my file with correction ...
the problem was :
if you try in game browser : maniaplanet://#join=ValleyVioK@TMCanyon
then you're redirected to RefuelVioK which is on TrackMania_2 ...
but once @TMCCanyon has been tried, then using @TMValley doesn't change things
and we're still going to RefuelVioK
I just tried it, I had to relaunch the game to make it work
Image

CPU : AMD FX-4170 (4 CPUs, ~4.2 GHz)
GPU : Sapphire Radeon HD 7850, 2 Go , DX 11
RAM : 8 Go DDR3
Win 7 Ultimate x64
Post Reply

Return to “ManiaLink”

Who is online

Users browsing this forum: No registered users and 1 guest