Aiken Full Member
Posts: 333 Status: Offline Gender: Male Location: In a very lonely place, the domain of despair Age: 34 Joined:
pmskypemsnyahooxfire | |
Michael Moderator
Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
pmvForum | Re: Mini-Profile code (modification) (16th Jan 10 at 11:48pm UTC) | | <script type="text/javascript"> function Token(Tokens){ var numbers = [ ["http://i266.photobucket.com/albums/ii280/Ryuzaki_Master/"], //Root Image Directory ["Platinum", "2500", "TFAH_Token_Platinum.gif"], ["Gold", "500", "TFAH_Token_Gold.gif"], ["Silver", "20", "TFAH_Token_Silver.gif"], ["Copper", "1", "TFAH_Token.gif"] ]; var out = ''; for(i = 1; i < numbers.length; i++){ var temp = 0; while(Tokens >= numbers[i][1]){ Tokens -= numbers[i][1]; temp++; } out += '<img src = "' + numbers[0] + numbers[i][2] + '" />' + temp + ' ' + numbers[i][0] + ' Token' + (temp != 1? 's' : '') + '<br />'; } return out; }
document.write(Token(3021)); document.write('<br />' + Token(1234)); </script>
Try that. I've included the document.write at the bottom for you. | |
|
Aiken Full Member
Posts: 333 Status: Offline Gender: Male Location: In a very lonely place, the domain of despair Age: 34 Joined:
pmskypemsnyahooxfire | |
Michael Moderator
Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
pmvForum | Re: Mini-Profile code (modification) (17th Jan 10 at 12:20am UTC) | | That isn't needed! | |
|
Aiken Full Member
Posts: 333 Status: Offline Gender: Male Location: In a very lonely place, the domain of despair Age: 34 Joined:
pmskypemsnyahooxfire | |
Michael Moderator
Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
pmvForum | Re: Mini-Profile code (modification) (17th Jan 10 at 1:08am UTC) | | Ok | |
|