Solved how to change <none> to 0?

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

wrymain

Member
Feb 20, 2025
33
0
6
what i mean is this:
Screenshot 2025-04-11 185411.png


if it doesn't find an entity from the ground, it gives <none> which i want it to be "0", anyone have a solution?

Python:
every 10 minutes:
    broadcast "&7[&eClearLag&7] &r5 Menit sebelum Sampah dibersihkan dari tanah."
    wait 4 minutes
    broadcast "&7[&eClearLag&7] &r1 Menit sebelum Sampah dibersihkan dari tanah."
    wait 50 seconds
    broadcast "&7[&eClearLag&7] &r10 Detik sebelum Sampah dibersihkan dari tanah."
    wait 10 seconds
    loop all dropped items:
        delete loop-entity
        add 1 to {_num}
    broadcast "&7[&eClearLag&7] &c%{_num}%&r Sampah Terbersihkan."
 
The {_num} variable would never be set if there are no dropped items lying around, because the code in your loop is never executed.
You would have to either set {_num} to 0 before running the loop or use the default value expression. (%object% otherwise 0)
 
  • Like
Reactions: wrymain
The {_num} variable would never be set if there are no dropped items lying around, because the code in your loop is never executed.
You would have to either set {_num} to 0 before running the loop or use the default value expression. (%object% otherwise 0)
thanks