Support NATA 2014

Medals don't unlock

  • 326 Views
  • 13 Replies
New Topic Respond to this Topic
ZeroCreativity1
ZeroCreativity1
  • Member since: Mar. 6, 2011
  • Offline.
Forum Stats
Member
Level 01
Game Developer
Medals don't unlock Mar. 13th, 2013 @ 01:07 AM Reply

I added Metals to my game http://www.newgrounds.com/portal/view/612788. but it doesn't seem to be unlocking medals. On the preview page, it shows it being unlocked in the API Output when i call API.unlockMedal(inString). But the icon is still locked when i test it on the actual game. Am I missing a step or something?

Any help would be great.

FlyingColours
FlyingColours
  • Member since: Jul. 3, 2011
  • Offline.
Forum Stats
Member
Level 06
Programmer
Response to Medals don't unlock Mar. 13th, 2013 @ 06:02 AM Reply

Have you dragged the medal component onto your stage?

Mattster
Mattster
  • Member since: Nov. 21, 2007
  • Offline.
Forum Stats
Member
Level 20
Game Developer
Response to Medals don't unlock Mar. 13th, 2013 @ 10:24 AM Reply

At 3/13/13 06:02 AM, FlyingColours wrote: Have you dragged the medal component onto your stage?

The component is just for display purposes, and shouldn't effect unlocking.

Have your medals been approved? Check the status column on your medals page.

ZeroCreativity1
ZeroCreativity1
  • Member since: Mar. 6, 2011
  • Offline.
Forum Stats
Member
Level 01
Game Developer
Response to Medals don't unlock Mar. 13th, 2013 @ 06:59 PM Reply

They say un-tested. is there a special procedure to test them?

In the api output i get something along these lines
10 medals initialized.
0 scoreboards initialized.
0 save groups initialized.
Connection complete!
Loading flash ad...
Ad destroyed.
Unlocking medal "Basics"...

At 3/13/13 10:24 AM, Mattster wrote:
At 3/13/13 06:02 AM, FlyingColours wrote: Have you dragged the medal component onto your stage?
The component is just for display purposes, and shouldn't effect unlocking.

Have your medals been approved? Check the status column on your medals page.
Mattster
Mattster
  • Member since: Nov. 21, 2007
  • Offline.
Forum Stats
Member
Level 20
Game Developer
Response to Medals don't unlock Mar. 13th, 2013 @ 07:07 PM Reply

At 3/13/13 06:59 PM, ZeroCreativity1 wrote: They say un-tested. is there a special procedure to test them?

Ah. Try unlocking them on your Project page (NOT the portal page). If that doesn't work, try just unlocking them locally.

Mattster
Mattster
  • Member since: Nov. 21, 2007
  • Offline.
Forum Stats
Member
Level 20
Game Developer
Response to Medals don't unlock Mar. 13th, 2013 @ 07:17 PM Reply

Just an afterthought... You didn't publish it in Debug mode did you?

ZeroCreativity1
ZeroCreativity1
  • Member since: Mar. 6, 2011
  • Offline.
Forum Stats
Member
Level 01
Game Developer
Response to Medals don't unlock Mar. 13th, 2013 @ 09:22 PM Reply

What determines if the flash is in Debug Mode?

At 3/13/13 07:17 PM, Mattster wrote: Just an afterthought... You didn't publish it in Debug mode did you?
Mattster
Mattster
  • Member since: Nov. 21, 2007
  • Offline.
Forum Stats
Member
Level 20
Game Developer
Response to Medals don't unlock Mar. 13th, 2013 @ 09:39 PM Reply

At 3/13/13 09:22 PM, ZeroCreativity1 wrote: What determines if the flash is in Debug Mode?
At 3/13/13 07:17 PM, Mattster wrote: Just an afterthought... You didn't publish it in Debug mode did you?

Not the flash, but the API. If you use the connector, there would be a property on the component inspector. If it's done in code, then you'd have a line specifying so (which I assume you don't)

ZeroCreativity1
ZeroCreativity1
  • Member since: Mar. 6, 2011
  • Offline.
Forum Stats
Member
Level 01
Game Developer
Response to Medals don't unlock Mar. 13th, 2013 @ 09:42 PM Reply

At 3/13/13 09:39 PM, Mattster wrote:
At 3/13/13 09:22 PM, ZeroCreativity1 wrote: What determines if the flash is in Debug Mode?
At 3/13/13 07:17 PM, Mattster wrote: Just an afterthought... You didn't publish it in Debug mode did you?
Not the flash, but the API. If you use the connector, there would be a property on the component inspector. If it's done in code, then you'd have a line specifying so (which I assume you don't)

i added API.debugMode = API.RELEASE_MODE; to the code. but it doesn't seem to make a difference.

ZeroCreativity1
ZeroCreativity1
  • Member since: Mar. 6, 2011
  • Offline.
Forum Stats
Member
Level 01
Game Developer
Response to Medals don't unlock Mar. 21st, 2013 @ 01:20 AM Reply

At 3/13/13 09:39 PM, Mattster wrote:
At 3/13/13 09:22 PM, ZeroCreativity1 wrote: What determines if the flash is in Debug Mode?
At 3/13/13 07:17 PM, Mattster wrote: Just an afterthought... You didn't publish it in Debug mode did you?
Not the flash, but the API. If you use the connector, there would be a property on the component inspector. If it's done in code, then you'd have a line specifying so (which I assume you don't)

well i put i try catch around the unlockmedal function, and i get ReferenceError: Error #1074. when its on the newgrounds server. any ideas?

nitokov
nitokov
  • Member since: May. 8, 2012
  • Offline.
Forum Stats
Member
Level 05
Programmer
Response to Medals don't unlock Mar. 21st, 2013 @ 06:19 AM Reply

have you done this step:
Enter your API Entry information into the API Connector parameters.
In Flash CS5 or higher, look in the Properties tab. Enter your API ID and Encryption Key in the available fields. You can find your API entry information in the API Tools section of your project.


RangeError: Error #1125: The index 4 is out of range 4.

Mattster
Mattster
  • Member since: Nov. 21, 2007
  • Offline.
Forum Stats
Member
Level 20
Game Developer
Response to Medals don't unlock Mar. 21st, 2013 @ 07:47 AM Reply

Can you post the code you are using to unock them?

ZeroCreativity1
ZeroCreativity1
  • Member since: Mar. 6, 2011
  • Offline.
Forum Stats
Member
Level 01
Game Developer
Response to Medals don't unlock Mar. 21st, 2013 @ 10:41 AM Reply

At 3/21/13 07:47 AM, Mattster wrote: Can you post the code you are using to unock them?

try
{
API.unlockMedal(inString);
}
catch(e:Error)
{
//Global Textfield added to stage so i can see the error.
Constants.DebugText.text = "ERROR " + e;
}

ZeroCreativity1
ZeroCreativity1
  • Member since: Mar. 6, 2011
  • Offline.
Forum Stats
Member
Level 01
Game Developer
Response to Medals don't unlock Mar. 21st, 2013 @ 09:08 PM Reply

At 3/21/13 06:19 AM, nitokov wrote: have you done this step:
Enter your API Entry information into the API Connector parameters.
In Flash CS5 or higher, look in the Properties tab. Enter your API ID and Encryption Key in the available fields. You can find your API entry information in the API Tools section of your project.

I've been using api id and encryption key when i call API.connect. It seems to be working for ads, so i don't imagine the problem for medals. I am not using adobe cs for me project though.