#Hunger help me!!!!

1 messages · Page 1 of 1 (latest)

smoky willow
#

How can I make a skript that if u have the Lp rank “noob” the second it becomes your group or you respawn with it you get instantly only 3 hunger bars total

#

ANSWER NOW

#

Pleasssssssse

past forge
#

its been one minute calm down.

smoky willow
#

Who cares

#

One minute in my life I’ll never get back

past forge
#

and my time helping you ill never get back either. why should I bother?

smoky willow
#

Also for me it is 9:14 I’m currently 7 hours ahead of the us

#

I don’t have a lot of time

past forge
#

check the docs and try something yourself, theres expressions for LP groups and an effect for setting hunger levels

past forge
smoky willow
#

Yes but everything I try didn’t work

#

And I’m impatient

past forge
smoky willow
#

Sireously

pseudo aurora
#

then post it here along with the details so people can help you
this is a place to help people learn skript or with their specific problems in coding in skript, not to give you free working code upon request

#

if someone wants to do that they can go ahead but until they do you can try to do it yourself, or get some help with what you do have

smoky willow
#

On player respawn:
If player has perm blah blah blah:
Set the player’s food level to 10

#

That’s wa it showed when I looked it up

past forge
#

okay

#

that looks like a nice place to start

smoky willow
#

Ur okay with the blah blah blah but right

pseudo aurora
#
smoky willow
#

Chase everyone knows wa it is

pseudo aurora
#

also on respawn i guess

smoky willow
#

Define

[the] (food|hunger)[ ] [of %players%]
%players%'[s] (food|hunger)[ ]

pseudo aurora
smoky willow
#

Do I write that or or just plain set the player's food level to 10

#

Ik

#

That didn’t work

#

That’s wa I tried earlier

#

Fine lemme try

pseudo aurora
#

what was the issue..?

smoky willow
#

Gimme a minute

pseudo aurora
#

if there was an error send it here

smoky willow
#

It didn’t say issue

past forge
pseudo aurora
smoky willow
#

So just write the whole thing I am meant to write

past forge
#

thats your part

smoky willow
#

Like on respawn yadayadayada

pseudo aurora
smoky willow
#

I’m still confused

pseudo aurora
#

then send the code here

smoky willow
#

Send it plsssssssssss

#

Do I do
On respawn
If the guy has permission line right here too lazy to write it:
Set the player’s food level to 3

past forge
#

bruh

smoky willow
#

Do I do that

past forge
#

maybe practice writing actual code

smoky willow
#

Ik I’m lazy

pseudo aurora
#

literally just copy and paste it here bro

past forge
#

also,

smoky willow
#

Wa part of I’m lazy do u not understand

buoyant finchBOT
#

x8ight suggests that you read this embed

Formatting Code In Discord
Why?

Code blocks make it easier for helpers to identify potential errors -- help them help you!

The Format

```vb
on chat:
broadcast "This is how you format code!"
```

How It Looks
on chat:
    broadcast "This is how you format code!"
Extra Info

On US keyboards, the grave character (`) is located above the tab key on the top left of the keyboard

smoky willow
#

Did I’d i it right though

#

Do

past forge
smoky willow
#

Just answer

#

Yes or no

#

Before I click on that answer

#

Yes or no

#

Will it work

past forge
#

its your own job to test tun your own code

smoky willow
#

Fine

#

When I did it and respawned I still had full hunger

pseudo aurora
smoky willow
#

Yup

#

It ain’t working

#

I tried again and again

#

Whyyyyyyyyyyyyy

#

Whyyyyyyyyyyy it’s not fair

#

on respawn:
if player has permission "permission.food":
set food level of player to 3

#

I activated it for my Lp thingy

#

Allowed it

#

Made sure to reload skript

#

It said no errors

#

Didn’t work

#

Ï
—-

#

Help x8

past forge
#

debugit or maybe 🧇

smoky willow
#

????

past forge
#

oh wrong tab complete, waitatick

smoky willow
#

It didn’t say anything about tab

#

No actual tab is different

past forge
#

I tab-completed the wrong emoji in discord. Mean to say waitatick not 🧇

smoky willow
#

It’s just discord makes tab smaller

#

It was correct indent

#

Ö

#

:)(:):(:):(:):(:

#

Help equals good

past forge
#

debug it, or try waiting a tick after the event

smoky willow
#

Wa u mean

buoyant finchBOT
#

x8ight suggests that you read this embed

Debug
What is debugging?

Debugging is the process of finding and fixing bugs/issues/errors within your code. For a more detailed explanation on proper debugging check out sovdee's page

Variables

Since you don't see the value of variables it can be easy to assume that everything is working properly even though that might not be the case. Variables and arguments in functions and commands might change throughout your code in unexpected ways. It is a good idea to broadcast your variables at different points in your code to confirm that the value is what you expect it to be.

on chat:
    broadcast {chats::%player's uuid%}
    add 1 to {chats::%player's uuid%}
    broadcast {chats::%player's uuid%}```
In this example we broadcast the variable to check its value before and after we add to it to make sure the value goes up. If the variable was set to a string (`set {chats::%player's uuid%} to "3"`) then we would be able to see that the value did not go up, alerting us of the issue.
Conditions

If your code does no seem to be doing anything it is a good idea to establish which parts of your code are being executed, especially when using conditions. To accomplish this, add a broadcast after each part of line of your code with a descriptive message.

on right click:
    broadcast "player clicked"
    if player's tool = iron sword:
        broadcast "player's tool was iron sword"
        set player's tool to diamond sword```
In this example, we would only see the `player clicked` message if the player was holding an apple, alerting us that the code stopped after the first condition.
pseudo aurora
past forge
#

and literally ^

#

use the wait effect so the server has time to respawn the player, making sure you can apply potion effects, which wont work while they are dead

pseudo aurora
#

^