Aller au contenu
  • 0

Les Fonction ne fonctionne pas


Question

Posté(e)

Version: 1.7.10 KCauldron

Version skript: 2.1.2

Addons SKript: SkQuery, SkRayFall, SkExtras

Bonjour j'ai un problème les Fonction ne fonctionne pas sa me met l'erreur:

Fonction [NOM] is not a text.

J'ai chercher sur internet ses marqué que sa a été ajouter a une version skript plus haute mais les versions plus haute sont pas en 1.7.10

Merci de l'aide a venir.

4 réponses à cette question

Messages recommandés

  • 0
Posté(e)
function lobby(p: player):
   make console execute command "mvtp %{_p}% world"
   clear {_p}'s inventory
   clear {_p}'s level
   heal {_p}
   set {_p}'s hunger to 20
   set slot 3 of {_p} to compass named "&8➥ &e&lPLAY"
   set slot 5 of {_p} to book named "&8➥ &e&lSTATS"
		
on right click:
	name of event-item is "&8➥ &e&lPLAY":
		make player execute command "bg autojoin"
	name of event-item is "&8➥ &e&lSTATS":	
		make player execute command "bg stats"
		
	
command cmc:
	trigger:
		loop 100 times:
			send ""
			
on join:
	set join message to ""
	lobby(player)
	lobby_scoreboard(player)
		
function setSlot(p: player, board: text, slot: integer, t: text):
    add "&a", "&b", "&c", "&d", "&e", "&1", "&2", "&3", "&4", "&5", "&6", "&7", "&8", "&9" and "&f" to {_d::*}
    if {_slot} is between 1 and 15:
        set text of id "%{_p}%Slot%{_slot}%" to "%{_d::%{_slot}%}%%{_t}%"  
		
function lobby_scoreboard(p: player):
	add "&a", "&b", "&c", "&d", "&e", "&1", "&2", "&3", "&4", "&5", "&6", "&7", "&8", "&9" and "&f" to {_d::*}
	if stylish scoreboard "LOBBY-%{_p}%" does not exist:
		create new stylish scoreboard named "LOBBY-%{_p}%"
		loop 15 times:
			create a new id based score "%{_p}%Slot%loop-number%" with text "%{_d::%loop-number%}%" slot loop-number for stylish scoreboard "LOBBY-%{_p}%"
		wait a tick
	set stylish scoreboard of {_p} to "LOBBY-%{_p}%"
	set title of stylish scoreboard "LOBBY-%{_p}%" to "&e&lBATTLE ROYALE"
	set {_uuid} to uuid of {_p}
	while {_p}'s world is "world":
		if stylish scoreboard "LOBBY-%{_p}%" exists:	
			setSlot({_p}, "LOBBY", 15, "&7%now%")
			setSlot({_p}, "LOBBY", 14, "")					
			setSlot({_p}, "LOBBY", 13, "&b➦ &7USER:")	
			setSlot({_p}, "LOBBY", 12, "&3➥ &a%{_p}'s displayname%")	
			setSlot({_p}, "LOBBY", 11, "&c")					
			setSlot({_p}, "LOBBY", 10, "&b➦ &7WINS:")		
			setSlot({_p}, "LOBBY", 9, "&3➥ &a%{bg.stats.wins::%{_uuid}%}%")	
			setSlot({_p}, "LOBBY", 8, "")	
			setSlot({_p}, "LOBBY", 7, "&b➦ &7KILLS:")	
			setSlot({_p}, "LOBBY", 6, "&3➥ &a%{bg.stats.kills::%{_uuid}%}%")	
			setSlot({_p}, "LOBBY", 5, "")				
			setSlot({_p}, "LOBBY", 4, "&b➦ &7DEATHS:")	
			setSlot({_p}, "LOBBY", 3, "&3➥ &a%{bg.stats.deaths::%{_uuid}%}%")	
			setSlot({_p}, "LOBBY", 2, "")									
			setSlot({_p}, "LOBBY", 1, "&eMC.SERVER.NET")				
		wait a second	
		
on player world change:
	wait 0.5 second
	player's world is "world"
	lobby_scoreboard(player)

on break:
	player's world is "world":
		player does not have permission "lobby.build":
			cancel event
on place:
	player's world is "world":
		player does not have permission "lobby.build":
			cancel event
on drop:
	name of event-item is "&8➥ &e&lPLAY" or "&8➥ &e&lSTATS"
	cancel event
	
on inventory click:
	name of event-item is "&8➥ &e&lPLAY" or "&8➥ &e&lSTATS"
	cancel event	
	
on chat:
	player's world is "world"
	cancel event
	loop all players in player's world:
		send "&7%player% %player's prefix% &8➥ &7%message%" to loop-player
on quit:
	set quit message to ""
	
on damage of player:
	victim's world is "world"
	cancel event
	damage cause is void:
		make console execute command "mvtp %victim% world"
		
on hunger bar change:
	player's world is "world"
	cancel event
	
on right click on entity:
	name of clicked entity is "&e&lPLAY":
		make player execute command "bg autojoin"
	name of clicked entity is "&e&lSTATS":
		make player execute command "bg stats"

Voila

  • 0
Posté(e)

Effectivement il me semble que les fonctions ont été ajouté à partir de la version 2.2 de skript mais je ne sais pas si elle est en 1.7.10 et si ma mémoire me fait défaut...

Invité
Ce sujet ne peut plus recevoir de nouvelles réponses.
×
×
  • 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.