#skript not working with citizens

1 messages · Page 1 of 1 (latest)

granite sky
#

Code blocks

#

Indentation errors

#

Also shouldnt there be a space after the colon

#

And shouldnt the name of the place be capitalized

#

Also also you are setting it to a boolean then checking if its a number…

gusty cipher
#

im using citizens

#

and uhh

#

wdym

#

can you be more spesific

gusty cipher
granite sky
#

In the string

#

bob:hello -> bob: hello

granite sky
gusty cipher
#

can you... just tell me how to fix it man.. im trying to learn by experience

granite sky
#

You want me to spoon feed you? No

#

You need to learn so that you can fix future errors yourself

#

Other people wont fix all your problems for you

gritty mulch
#

doesnt even know what indentation it D:

tacit salmon
#

Withers, if you learn to indent then you will fix your skript, look below for an example 🙂
!indent

zinc arrow
#

Y’all make the skript community look really mean, Withers you’re fine

granite sky
#

Not being mean, just telling him to have a basic understanding of code before he actually tries to code something

tacit salmon
#

Why didnt my !indent show...

crisp anchor
#

@gusty cipher Code?

gusty cipher
#

uh

#

i deleted it out of shame but here

#

its slightly modified

#

but

#

options:
delay: 2
on right click on entity:
if name of entity is "&4Thomas":
if {npc1click::%player's uuid%} is not set:
set {npcclick::%player's uuid%} to false
{npc1click::%player's uuid%} = false
set {npc1click::%player's uuid%} to true

if {npc1click::%player's uuid%} ? 0 = 0:
    message "&4Thomas&f: HALT! who goes there? oh your just a kid... well uh welcome to elania! but unfortunately we arent allowed to accept visitors untill that &6&lDamn alpha wolf&f&r is dealt with. so please come again another time when a competent adventurer takes it out." to player 
    wait 5 seconds
    message "&4Thomas&f: although.... you look like an adventurous sorta kid. maybe YOU can kill it. it would allow people to get into elania and i'd even give you a special blade for your troubles. the wolf lives in its cave in the forest, although i hear its trapped. good luck!" to player
    wait 5 seconds
    message  "&6Quest recieved: slay the alpha wolf and bring proof of its death to thomas" to player
    set {npc1click::%player's uuid%} to 1
    
    set {npc1click::%player's uuid%} to false

command /quests:
trigger:
send "&6- &aQuests &6-"
if {npc1click::%player's uuid%} = 1:
message "&6&lKill the Alpha wolf and bring proof of its death to Thomas" to player

#

its not fully done yet though.. but it SHOULD activate the quest

crisp anchor
#

What's the error

tacit salmon
#

Cabbar its indent

#

Let me teach you indent wither, as i want to help, i wont be rude. Dw

#

Indenting,
How to indent,
Indent is another word for spaces.
At the end of every if line you require a colon, then when you do your next line you do math.
You add the number of spaces from the last line +2 to your new line,
Example:

if arg 1 is set: # has 0 spaces this line
  if arg 2 is set: # 0 + 2 = 2 this line has 2 spaces
    if arg 3 is set: # previous line had 2 spaces so 2 + 2 is four as after every colon you add 2 to your next line.
#

If you look at your skript you see
(Example)

if name of entity is "":
if {} isn't set:
``` remember, after every colon what do you do? Add 2 spaces to your next line.

To make it simple, you combine the amount of spaces of the last line with 2.
#

Correct,

if name of entity is "":
  if {} isn't set:
``` As you see, i added 2 spaces to the next line, hope this helps 🙂 @gusty cipher
gusty cipher
#

ty

#

i realied

#

minehut does a weird thing

#

when i press enter it looks like it carried over the spaces

#

but it just put 2 tabs??

#

tysm

#

i did all of that

#

but it still wont talk to m

#

me*

tacit salmon
#

I can help, if you want.

zinc arrow
gusty cipher
#

btw

#

thank you for telling me the problem

#

i fixed it (it still doesnt work)

zinc arrow
#

How come it doesn’t work?

gusty cipher
#

it now works

granite sky
#

I was referring to the indentation error here

gusty cipher
#

dw

#

i fixed it dw

#

i know

#

quest works now