ID:71007
 
mob
verb/PFOO()
var/list/medalslist = params2list(world.GetMedal(src.ckey))
var/BPUT = "<b>[src.name]'s Medals</b>"

for(var/a in medalslist)
BPUT += "<br>[a]"
if(!medalslist.len)
BPUT += "<br>[src.name] doesn't have any medals (yet!)."
src<<browse(BPUT)



It always keeps saying i have no medals...When i do Why?
Sometimes games have issues contacting the hub. I've had problems with high scores not being reported for Tomb Explorer when people earn them. Best to design your game to assume the hub won't always be contacted properly.
So what your saying is this can't be fixed?
I'm saying it might not be a problem in your code.
Oh, ok but if i can't ever get this fixed that will suck hardcorely.
Do a test to see if a world.GetMedal() proc returns true or false on isnull(). If isnull() returns true, then it's not contacting the hub properly. - Not your fault.

var/test = world.GetMedal(src.ckey)
if(isnull(test))
world << "Not contacting hub!"
else
world << "Hub works fine."
Is your problem with the byond page aspect of it? Or is it an in-game problem?
in game and foomer it says that hub is working fine
Well, they're not listed here, try going to layout and making them viewable. I doubt that'll help but it's worth a try.
Ok.
I pasted your code into Tomb Explorer and it works fine, at least in that my version outputs the results into the world.log. There's no issue with retrieving the medals info. The issue is either with the hub or the hub page.
Could it be in my set medal?

I should also mention, if you didn't realize this, that using world.GetMedal() without a specific medal defined returns a params list of all the medals in the game, not all the medals that the player has acquired.
Which game hub are you dealing with here?
I know i'm only wanting it to return medals earned in my game.
If they don't show up on the left side and you've acquired them, then it's probably a problem with the code to award the medals.

Most of those hastily-made/ripped games with medals tend to not go through, while more reputable ones do.
Dude......my medals are to the left >.>
I didn't know if those were the ones you wanted or not. You never mentioned the games name, not even when foomer asked you. <.<
O i didnt even see where he asked me im so sorry its Duel Monsters Revolution http://www.byond.com/games/XxBloodyNightmarexX/DMV
mob
verb/PFOO()
var/getmedals = world.GetMedal(src.ckey, null, "XxBloodyNightmarexX.DMV")

var/list/medalslist = params2list(getmedals)
var/BPUT = "[src.name]'s Medals"

for(var/a in medalslist)
BPUT += "\n[a]"
if(!medalslist.len)
BPUT += "\n[src.name] doesn't have any medals (yet!)."
world.log << BPUT

Works totally fine...
Page: 1 2