ackvonhuelio uh it looks like the for loop isn't quite working, I'm testing it with hidden achievements and it just shows as 0, even though there's a few
I don't know what it's called but I need help with it
VarrienceLvl 25
Mellow well did you format it properly? the way Ack show it is object array and i'll give a smaller demo of what he did that way it should be followable
// This is a DEMO please read comments if your stuck or confused
var accomp = [
{
title: "new world", // a title of the achivement optional properties like description can also be added
unlocked: true // the property to look for if we unlocked the achivement
}, // , <= is important since this is an array
{
title: "pro",
unlocked: false
},
{
title: "gamer",
unlocked: true
}
];
// here we are going to count how many achivements we have left
console.log(accomp.length) // <= this will give us how many achivements we have
var unlocked = 0; // keeps track of the current achivements we have
for (var a = 0; a < accomp.length; a++) { // here we iterate through the array
if (accomp[a].unlocked === true) { // === true doesn't need to be there if's already look for a boolean outcome
unlocked += 1; // we add here how many is unlocked
}
}
// here is something more complex we know how many achivements we unlocked and how many we have,
// but how do we show that as output since "-" statements are illegal in console.log statements
var achivementsLeft = accomp.length - unlocked; // this makes it so no () are needed
console.log("You have " + unlocked + " achivements so far\n There's " + achivementsLeft + " left go get em champ")
// this is how it would be done given that you didn't want to declare a variable for a result
console.log("You have " + unlocked + " achivements so far\n There's " + (accomp.length - unlocked) + " left go get em champ")
personLvl 62
yeah none of us can actually understand varriance but just go with whatever he's saying its probably right.
ackvonhuelioLvl 41
Mellow
for loops are suuupeeerr useful, so definitely take the time to actually learn how they work and don't just copy and paste
INTERNECION lol really what did i do because all i type was
so I can tell brendan and fluffy about this
Because I didnt do jack shit! lol whatever you idk
INTERNECION mhm sure sure
INTERNECION I only upvote my own stuff so I can piss off chubz since he cares so much about it
liesss
INTERNECION I never chose mod. BRENDAN JUST GAVE IT TO ME
lies you begg for it
INTERNECIONLvl 62
- Edited
- Windows
2kChubz Alright since a one day suspension wasn't enough for you to not start any problems. then I will just give you a three day. At this point and time all you do is instigate and that is a problem. You have done nothing to help anyone since the day you came on this forum. I will not deal with your shenanigans again. So now that you understand what you're doing is ban worthy, a three day suspension should suffice. Come back when you actually have the competence to have a decent conversation and not causing problems for no reason. Here cool off for the moment
personLvl 62
Dies from the stupidity
ackvonhuelioLvl 41
Dies from the stupidity of your stupidity in being so stupid that you change the stupidity of the definition of the word stupid
INTERNECIONLvl 62
- Edited
- Windows
I told you many times why you were suspended. One of them was not listening to the warnings I gave you about not starting fights. Instigating is still starting a fight. Another one is being disrespectful to the moderator. this is not tolerated. Another one can be technical spam when given warning many times to not do that at all. and yet you have continued. 12 notifs and 10 of them are downvotes in the span of 2 minutes. like bro we get it you care about the point system. Some of the stuff I say wasn't even upvoted by yours truly and yet you still did it. so therefore you are trying to get at something here
um what how spaming um never then because Ima GeT bAn!
INTERNECIONLvl 62
- Windows
2kChubz you kept downvoting my messages when you said you would stop twice before so you lied to me and kept going. You have constantly done so as well which screws up my notifications. You also never told me whether you want to become my friend to end this drama or you want to keep going and be a foe. Your actions say that you want to keep going and that is also a reason why I suspended you for 3 days.
personLvl 62
-_-
at this point im not even sure who's fault it is