#Issues with checking badges

1 messages · Page 1 of 1 (latest)

versed falcon
#

i have a function here which deals with checking badges and colors ones you have, colors ones that got updated, and colors ones that have an error but should NOT color ones you dont have
i tihnk ive found the reason why but if i change my code to fix it, the badgesAlreadyGot table fills up with everything

#

it results as error if you dont have a badge

#

i think the culprit lies in this:

if not updated or not (success and result) and v.Parent ~= badgeFolder then
  local badgesuc, badgeres = RE  remfunc:InvokeServer(tonumber(badgeID.Name), v)
  if badgesuc and badgeres then updated = true success = true result = true end
  badgeAsync = true
  print("alsotrue", v.Name)
end
#

because i check if BOTH badgesucesss and badgeresponse return true (the remotefunction goes to a script in sss which does userhasbadgeasync) but if i separate it into nested if statements instead it breaks the whole system

#

if u want the whole script + DSS script im happy to share it

acoustic plume
#

I genuinely can't read that code