Referral skript Error

  • 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!

legendofgow

New Member
Mar 22, 2024
8
0
1
29
Hello,

So i have simple skript for referral players


And as you can see in parser, there is this error:

Code:
Can't compare a player with 'in group "referral"'
else if player is in group "referral":

And skript dont send console commands upon check if player is in referral group, im using PermSk, but even using wiki https://skripthub.net/docs/?id=10117 im to dumb to fix this, there is always some new error ;/

Anyone know how to fix it? :emoji_slight_smile:
 
The parser link you sent doesn't contain any code as it is not properly saved as a resource/parser file. Please provide your code.
 
If I was not logged in, I would not be able to comment on this forum. The file is saved to your account, and cannot be accessed from another.
Weird :emoji_sweat_smile:

Code:
on first join:
 execute console command "/lp user %player% parent add referral"


command /polecenia <offline player>:
 trigger:
  if arg-1 is player:
   message "&8[&b&l!&8] &b&lPolecenia &8→ &cNie możesz wpisać samego siebie jako poleconego!"
  else if player is in group "referral":   
   execute console command "/lp user %player% parent remove referral"
   execute console command "/excellentcrates:crate key give %arg 1% rare 1"
   message "&8[&b&l!&8] &b&lPolecenia &8→ &aWpisałeś %arg 1% jako osobę, która Cię poleciła! Został nagrodzony!"
  else:
   message "&8[&b&l!&8] &b&lPolecenia &8→ &cJuż wprowadziłeś swoje polecenia!"
 
Weird :emoji_sweat_smile:

Code:
on first join:
 execute console command "/lp user %player% parent add referral"


command /polecenia <offline player>:
 trigger:
  if arg-1 is player:
   message "&8[&b&l!&8] &b&lPolecenia &8→ &cNie możesz wpisać samego siebie jako poleconego!"
  else if player is in group "referral":  
   execute console command "/lp user %player% parent remove referral"
   execute console command "/excellentcrates:crate key give %arg 1% rare 1"
   message "&8[&b&l!&8] &b&lPolecenia &8→ &aWpisałeś %arg 1% jako osobę, która Cię poleciła! Został nagrodzony!"
  else:
   message "&8[&b&l!&8] &b&lPolecenia &8→ &cJuż wprowadziłeś swoje polecenia!"
To check a player’s group, you’ll have to use the condition, ‘If player’s group is “example”:’
 
  • Like
Reactions: legendofgow
To check a player’s group, you’ll have to use the condition, ‘If player’s group is “example”:’
New error show up :emoji_grinning:



But i have question about how addons works, we have a visible error, and how does the script (plugin) know that these condition are from the add-on? when I upload an addon, say PermSK, to the server, then the script will also start checking my code in new condition from this addon?
 
Probably is because of the quotation marks, use "".
That was good idea, but now we have new error :emoji_grinning:


Code:
command /polecenia <offline player>:
 trigger:
  if arg-1 is player:
   message "&8[&b&l!&8] &b&lPolecenia &8→ &cNie możesz wpisać samego siebie jako poleconego!"
  else if player’s group is "referral": 
   execute console command "/lp user %player% parent remove referral"
   execute console command "/excellentcrates:crate key give %arg 1% rare 1"
   message "&8[&b&l!&8] &b&lPolecenia &8→ &aWpisałeś %arg 1% jako osobę, która Cię poleciła! Został nagrodzony!"
  else:
   message "&8[&b&l!&8] &b&lPolecenia &8→ &cJuż wprowadziłeś swoje polecenia!"