ID:159272
 
Is there something I'm missing that's preventing my scores from reaching the hub? I'm logged into Tomb Explorer using my key, but when I tell it to submit a score, it fails to do so. I'm wondering if there might be any other issues involved. It doesn't seem to be a problem with my code. Does the world need to be hosted or something?
It doesn't need to be hosted. As long as your connection to the hub is good you shouldn't have any problems. If you're using a version older than 439 you might find you have more success during times when the game can't talk to the pager for whatever reason.

Lummox JR
In response to Lummox JR
Everything seems to be fine, but scores still aren't being submitted. The SetScores() function keeps returning null, even though I have it set as SetScores("Foomer", params). Any ideas?
In response to Foomer
Foomer wrote:
SetScores("Foomer", params)

Maybe you need to specify hub/hub password, since they might not be set in your game (given the fact that it's single player)?
Did you check with isnull() to see if the return value was indeed null?
In response to Schnitzelnagler
Schnitzelnagler wrote:
Foomer wrote:
SetScores("Foomer", params)

Maybe you need to specify hub/hub password, since they might not be set in your game (given the fact that it's single player)?
Did you check with isnull() to see if the return value was indeed null?

I didn't have a hub or a hub password defined in the game, but I've since assigned both, as well as double-checking that isnull returns true.

// Scores will only be submitted if the user is online.
if(isnull(world.SetScores(src.key, list2params(records), world.hub, world.hub_password)))
world.log << "Failed to submit scores to BYOND."
else
world.log << "Scores submitted to BYOND."


The result is always "Failed to submit scores to BYOND."
In response to Foomer
Well since I can't seem to identify what the problem is, I've gone ahead and uploaded the changes to the latest version of Tomb explorer.

http://www.byond.com/games/Foomer/TombExplorer

If scores start to appear on the Standings table, I'll know its just me.

Failing that, it would be nice if someone would create an open hub entry with a demo to demonstrate how to use scores properly.
In response to Foomer
I just downloaded and played (up to level 7 for a test run).
Seems my scores did not get submitted, but I received no error message in game.
I've been presented with the "old" score system of yours.
In response to Schnitzelnagler
The in-game score system hasn't changed, but I really don't understand why it isn't submitting. According to the information that BYOND News provided, I seem to be doing everything right. Can someone who's used this properly put up an open-source demo somewhere showing everything you need to do?
In response to Foomer
I just checked to see if submitting scores still worked and used Tsfreaks Tower Defense: Clone Wars. I could successfully get a "hard" setting submitted, so that might be a good check to see if the system works for you as well and if it does, I'm sure that Tsreaks would be glad to assist you and try to seek the problematic point with you.

One last idea I have though is something I realised with Tower Defense. When I did not have a (medium) Score set, (the first 'sorted' score with asterisk), I could not get other fields set. So, did you ensure that the field you are using for sorting is given a value?
In response to Foomer
I'd wonder if this has something to do with your world/hub declaration?

I'm not sure if that impacts this scenario at all but maybe double check the spelling.

Example: hub = "Tsfreaks.TowerDefense";

My working example (last I checked) is nearly identical to what you are using so I don't know if it will help or not.
    Proc_SetHubScore();
{
if (g_HubScore < g_Score)
{
var/params;
switch(g_DifficultyLevel)
{
if("Easy")
{
params = list("Easy HighScore" = g_Score);
}
if("Normal")
{
params = list("HighScore" = g_Score);
}
if("Hard")
{
params = list("Hard HighScore" = g_Score);
}
}
//
// An unfriendly handler in case the hub is down during submission of score.
//
if(isnull(world.SetScores(g_Host.key, list2params(params))))
{
alert("Sorry, the hub could not be contacted to record your score.");
}
}
}


ts
In response to Tsfreaks
world
name = "Tomb Explorer"
version = 30
hub = "Foomer.TombExplorer"
hub_password = "fakepass123456"


Looks fine to me...
In response to Schnitzelnagler
Schnitzelnagler wrote:
did you ensure that the field you are using for sorting is given a value?

The field that I use for sorting is the first value submitted, so I don't think that's the problem.
In response to Foomer
Although I find it rather peculiar, but suddenly scores are submitting just fine. It doesn't seem like I've changed anything though...

So, once again, if you'd care to try it out and see if your scores submit properly after completing a level or more:

http://www.byond.com/games/Foomer/TombExplorer