Results 1 to 6 of 6

Thread: Tag Info

  1. #1
    New User
    Join Date
    2017-10-09
    Location
    Sydney
    Posts
    29

    Tag Info

    Hello guys,

    Is their any reason why the code pd.player.tag doesnt work.
    Shouldn't it display the players "tags" or "Clan"? or have I missed out this point of the tag.

  2. #2
    Administrator HigH_HawK's Avatar
    Join Date
    2006-03-15
    Location
    UK / GER
    Posts
    1,381

    Re: Tag Info

    Hi SYD,

    I think pd.player.tag="" is never being filled with any data. I'm not sure but I guess we don't get this data from EA/DICE, so it stays empty. It's however being added due to it being part of the data we get.

  3. #3
    New User
    Join Date
    2017-10-09
    Location
    Sydney
    Posts
    29

    Re: Tag Info

    Hi High_Hawk,

    Thank you for your response.
    That's disappointing to hear, but least I now know why it doesn't work.

    Could you help me out with to sort out some code that I'm having issues with?

    Code:
    // Medal count
    var Medals_count=0;
    var Medals_have=0;
    
    for(var r in pd.stats.extra.medalsTotal)
    
    	{Medals_count++;
                                                 
    		if(pd.stats.extra.medalsUnlocked[r].count) Medals_have++;
    	}
    text({x:120, y:120, size:11, text:'Medals I have '+Medals_have+' of '+Medals_count+' Medals'});
    both pd items just come up with a valve if I use them independently but If I'm trying to count them they come up as 0. what am I doing wrong.

  4. #4
    Administrator HigH_HawK's Avatar
    Join Date
    2006-03-15
    Location
    UK / GER
    Posts
    1,381

    Re: Tag Info

    Just done a quick one, not sure if that's what you are looking for

    Code:
    // Medal count
      var Medals_count=pd.stats.extra.medalsTotal;
      var Medals_have=pd.stats.extra.medalsUnlocked;
    
      for (r = 0; r < Medals_count; r++) {
                                                 
    		if(pd.stats.extra.medalsUnlocked[r]) Medals_have++;
    	}
        
      text({x:120, y:120, size:11, text:'I have '+Medals_have+' of '+Medals_count+' Medals'});

  5. #5
    New User
    Join Date
    2017-10-09
    Location
    Sydney
    Posts
    29

    Re: Tag Info

    Hi High_Hawk,

    That's fantastic thank you so much.

    I only have one other request but ill send that through a little later as I have been trying to work on this bit of code for months, lol luck, however, I will be trying a few little things first.

    Once again thank you. The code works perfectly.

  6. #6
    Administrator HigH_HawK's Avatar
    Join Date
    2006-03-15
    Location
    UK / GER
    Posts
    1,381

    Re: Tag Info

    Hi SYD,

    great to see that this is what you were looking for. Sure, if you need anything, don't hesitate to ask. If we're able to help, we'll do so

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
P-STATS NETWORK FORUM LOGIN CREATE ACCOUNT