Aller au contenu
  • 0

Radius


Question

Posté(e)

Bonjour,

 

Je suis entrain de faire un script de inventory walk mais sa ne marche pas :

[20:24:20 ERROR]: 'in radius 5 around {inventory.%player%.position}' is not an entity type (cw.sk, line 115: player is in radius 5 around {inventory.%player%.position}:')
[20:24:20 INFO]: [skript] Encountered 1 error while reloading cw.sk!

 

Donc j'aimerais savoir comment faire :) voila mon script

 

on inventory open:
   set {inventory.%player%.position} to location of player
   wait 1 second
   if tps is more than 18:
       if player's ping is less than 150:
           if player is in radius 5 around {inventory.%player%.position}:

 

Merci :)

20 réponses à cette question

Messages recommandés

  • 0
Posté(e)
[13:40:15 INFO]: [skript] Reloading cw.sk...
[13:40:15 ERROR]: '5 blocks' is not an entity type (cw.sk, line 115: if distance between player and {inventory.%player%.position} is less than 5 blocks:')
[13:40:15 INFO]: [skript] Encountered 1 error while reloading cw.sk!

  • 0
Posté(e)
[13:40:15 INFO]: [skript] Reloading cw.sk...
[13:40:15 ERROR]: '5 blocks' is not an entity type (cw.sk, line 115: if distance between player and {inventory.%player%.position} is less than 5 blocks:')
[13:40:15 INFO]: [skript] Encountered 1 error while reloading cw.sk!

Essaye:

if distance between player's location and {variable} < 5:

  • 0
Posté(e)

Marche pas, pas d'erreur mais marche pas.

C'est peut-être mon script qui déconne

 

on inventory open:
   set {inventory.%player%.position} to location of player
   wait 1 second
   if tps is more than 18:
       if player's ping is less than 150:
           if distance between player's location and {inventory.%player%.location} < 5:
               if file "plugins/CheatWarn/InventoryWalk/%player%.yml" doesn't exists:
                   create file "plugins/CheatWarn/InventoryWalk/%player%.yml"
                   wf "Creation du fichier: %now%" to "plugins/CheatWarn/InventoryWalk/%player%.yml"
                   wf "IP : %player's ip%" to "plugins/CheatWarn/InventoryWalk/%player%.yml"
                   wf "UUID : %player's UUID%" to "plugins/CheatWarn/InventoryWalk/%player%.yml"
                   wf "" to "plugins/CheatWarn/InventoryWalk/%player%.yml"
                   wf "" to "plugins/CheatWarn/InventoryWalk/%player%.yml"   
                   wf "[%now%] Verifié par CheatWarn" to "plugins/CheatWarn/InventoryWalk/%player%.yml"
               else:
                   wf "" to "plugins/CheatWarn/InventoryWalk/%player%.yml"
                   wf "" to "plugins/CheatWarn/InventoryWalk/%player%.yml"   
                   wf "[%now%] Verifié par CheatWarn" to "plugins/CheatWarn/InventoryWalk/%player%.yml"

  • 0
Posté(e)
Marche pas, pas d'erreur mais marche pas.

C'est peut-être mon script qui déconne

 

on inventory open:
   set {inventory.%player%.position} to location of player
   wait 1 second
   if tps is more than 18:
       if player's ping is less than 150:
           if distance between player's location and {inventory.%player%.location} < 5:
               if file "plugins/CheatWarn/InventoryWalk/%player%.yml" doesn't exists:
                   create file "plugins/CheatWarn/InventoryWalk/%player%.yml"
                   wf "Creation du fichier: %now%" to "plugins/CheatWarn/InventoryWalk/%player%.yml"
                   wf "IP : %player's ip%" to "plugins/CheatWarn/InventoryWalk/%player%.yml"
                   wf "UUID : %player's UUID%" to "plugins/CheatWarn/InventoryWalk/%player%.yml"
                   wf "" to "plugins/CheatWarn/InventoryWalk/%player%.yml"
                   wf "" to "plugins/CheatWarn/InventoryWalk/%player%.yml"  
                   wf "[%now%] Verifié par CheatWarn" to "plugins/CheatWarn/InventoryWalk/%player%.yml"
               else:
                   wf "" to "plugins/CheatWarn/InventoryWalk/%player%.yml"
                   wf "" to "plugins/CheatWarn/InventoryWalk/%player%.yml"  
                   wf "[%now%] Verifié par CheatWarn" to "plugins/CheatWarn/InventoryWalk/%player%.yml"

Pense a relire tes codes, l'erreur viens de ta variable;

- {inventory.%player%.position} = location du joueur déclarée

- {inventory.%player%.location} = location du joueur non déclarée

Change ton "{inventory.%player%.location}" en "{inventory.%player%.position}"

  • 0
Posté(e)
Eh toutes les variables inventory.... ?

T'as pas vraiment l'air de comprendre ce que je te dis, pas grave, je te refait ton code ^^

on inventory open:
   set {inventory.%player%.position} to player's location
   wait 1 second
   if tps is more than 18:
       if player's ping is less than 150:
           if distance between player's location and {inventory.%player%.position} < 5:
               if file "plugins/CheatWarn/InventoryWalk/%player%.yml" doesn't exists:
                   create file "plugins/CheatWarn/InventoryWalk/%player%.yml"
                   wf "Creation du fichier: %now%" to "plugins/CheatWarn/InventoryWalk/%player%.yml"
                   wf "IP : %player's ip%" to "plugins/CheatWarn/InventoryWalk/%player%.yml"
                   wf "UUID : %player's UUID%" to "plugins/CheatWarn/InventoryWalk/%player%.yml"
                   wf "" to "plugins/CheatWarn/InventoryWalk/%player%.yml"
                   wf "" to "plugins/CheatWarn/InventoryWalk/%player%.yml" 
                   wf "[%now%] Verifié par CheatWarn" to "plugins/CheatWarn/InventoryWalk/%player%.yml"
               else:
                   wf "" to "plugins/CheatWarn/InventoryWalk/%player%.yml"
                   wf "" to "plugins/CheatWarn/InventoryWalk/%player%.yml" 
                   wf "[%now%] Verifié par CheatWarn" to "plugins/CheatWarn/InventoryWalk/%player%.yml"

Par contre, évite de te fier au TPS et aussi au "more than" ou "less than" les signes < , > ou = sont mieux adaptés

  • 0
Posté(e)

A ok

Erreur :

[16:06:03 INFO]: [skript] Reloading cw.sk...
[16:06:03 ERROR]: 'tps is' is not an entity type (cw.sk, line 117: if tps is > 18:')
[16:06:03 INFO]: [skript] Encountered 1 error while reloading cw.sk!

  • 0
Posté(e)
A ok

Erreur :

[16:06:03 INFO]: [skript] Reloading cw.sk...
[16:06:03 ERROR]: 'tps is' is not an entity type (cw.sk, line 117: if tps is > 18:')
[16:06:03 INFO]: [skript] Encountered 1 error while reloading cw.sk!

Enlève les TPS de ton code

×
×
  • Créer...

Information importante

Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer.