ID:1027927
 
Not a bug
BYOND Version:497
Operating System:Windows 8 Professional
Web Browser:Internet Explorer 10.0
Applies to:DM Language
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND forums.
Descriptive Problem Summary:
When trying to get a list of all medals a player has earned in a hub other than that of your own, and specify the hub-entry(optionally) then it will not work.

Numbered Steps to Reproduce Problem:
Try and retrieve a list of medals a player has earned in another hub-entry.

Code Snippet (if applicable) to Reproduce Problem:
mob
verb
Check_Medals()
spawn()
var/Medals=world.GetMedal(src,"Mickemoose.Rage")
if(isnull(Medals))
world<<"Failed to retrieve medals for the game."
for(var/a in params2list(Medals))
world<<a


Expected Results:
It will let me use that even while specifying the optional hub-entry to use in grabbing medal data.

Actual Results:
If you specify an optional hub entry without also specifying a specific medal, it always returns the value for failing to connect to the hub. (null)

Does the problem occur:
Every time? Or how often?Every Time
In other games?Yes
In other user accounts?Yes
On other computers?Yes

When does the problem NOT occur?
Always

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Untested/no previous known to work.

Workarounds:
Grab the data for medals one by one...

Otherwise, you can specify in world.hub that, that's the hub you want to access, but when specifying(optionally) the hub in GetMedal() and using it to retrieve a list of all medals, it fails...

And also if you do that you can't host the game & have it appear on your hub, since you changed world.hub just to get it to work.

Well, what you are talking of specifically is different than my situation, i'm doing all my tests ran off my computer alone...

Also, it does work when setting world.hub to the hub you want to check, but not when specifying a different hub-entry using the optional hub argument GetMedal() is supposed to take...

This extra argument works fine, when you actually check a specific medal for a player, but not when checking all medals for a given player.
I was looking through old posts to see if any old bugs still exist, and it looks like this was likely not even a bug to begin with, it looks like you literally have to pass NULL in where-as in the code from my original post, I skipped the parameter altogether.
Lummox JR resolved issue (Not a bug)