Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Problem ze skryptem na chat nie dziala przy "\\"


Pi3GUS3K

Rekomendowane odpowiedzi

Opublikowano

Siema, napisalem latwy skrypt na chat jednak, kiedy gracz wysle "\" wywala mi bledy z skryptu i przestaje dzialac tylko na ta 1 wiadomosc, pozniej dziala normalnie :(

 

Blad:

 

 

[15:25:17] [server thread/ERROR]: #!#!
[15:25:17] [server thread/ERROR]: #!#! [skript] Severe Error:
[15:25:17] [server thread/ERROR]: #!#!
[15:25:17] [server thread/ERROR]: #!#! If you're developing an add-on for Skript this likely means that you have done something wrong.
[15:25:17] [server thread/ERROR]: #!#! If you're a server admin however please go to http://dev.bukkit.org/server-mods/skript/tickets/
[15:25:17] [server thread/ERROR]: #!#! and check whether this error has already been reported.
[15:25:17] [server thread/ERROR]: #!#! If not please create a new ticket with a meaningful title, copy & paste this whole error into it,
[15:25:17] [server thread/ERROR]: #!#! and describe what you did before it happened and/or what you think caused the error.
[15:25:17] [server thread/ERROR]: #!#! If you think that it's a trigger that's causing the error please post the trigger as well.
[15:25:17] [server thread/ERROR]: #!#! By following this guide fixing the error should be easy and done fast.
[15:25:17] [server thread/ERROR]: #!#!
[15:25:17] [server thread/ERROR]: #!#! Stack trace:
[15:25:17] [server thread/ERROR]: #!#! java.lang.StringIndexOutOfBoundsException: String index out of range: 20
[15:25:17] [server thread/ERROR]: #!#! at java.lang.String.charAt(Unknown Source)
[15:25:17] [server thread/ERROR]: #!#! at java.util.regex.Matcher.appendReplacement(Unknown Source)
[15:25:17] [server thread/ERROR]: #!#! at java.util.regex.Matcher.replaceAll(Unknown Source)
[15:25:17] [server thread/ERROR]: #!#! at java.lang.String.replaceAll(Unknown Source)
[15:25:17] [server thread/ERROR]: #!#! at ch.njol.util.StringUtils.replace(StringUtils.java:406)
[15:25:17] [server thread/ERROR]: #!#! at ch.njol.skript.effects.EffReplace.execute(EffReplace.java:85)
[15:25:17] [server thread/ERROR]: #!#! at ch.njol.skript.lang.Effect.run(Effect.java:50)
[15:25:17] [server thread/ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:63)
[15:25:17] [server thread/ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:91)
[15:25:17] [server thread/ERROR]: #!#! at ch.njol.skript.lang.Trigger.execute(Trigger.java:53)
[15:25:17] [server thread/ERROR]: #!#! at ch.njol.skript.events.EvtChat$1.execute(EvtChat.java:68)
[15:25:17] [server thread/ERROR]: #!#! at ch.njol.skript.events.EvtChat$1$1.call(EvtChat.java:87)
[15:25:17] [server thread/ERROR]: #!#! at ch.njol.skript.events.EvtChat$1$1.call(EvtChat.java:1)
[15:25:17] [server thread/ERROR]: #!#! at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftFuture.run(CraftFuture.java:89)
[15:25:17] [server thread/ERROR]: #!#! at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345)
[15:25:17] [server thread/ERROR]: #!#! at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:587)
[15:25:17] [server thread/ERROR]: #!#! at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:250)
[15:25:17] [server thread/ERROR]: #!#! at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:545)
[15:25:17] [server thread/ERROR]: #!#! at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:457)
[15:25:17] [server thread/ERROR]: #!#! at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617)
[15:25:17] [server thread/ERROR]: #!#!
[15:25:17] [server thread/ERROR]: #!#! Version Information:
[15:25:17] [server thread/ERROR]: #!#! Skript: 2.1.2
[15:25:17] [server thread/ERROR]: #!#! Bukkit: 1.7.2-R0.4-SNAPSHOT
[15:25:17] [server thread/ERROR]: #!#! Minecraft: 1.7.2
[15:25:17] [server thread/ERROR]: #!#! Java: 1.7.0_25
[15:25:17] [server thread/ERROR]: #!#!
[15:25:17] [server thread/ERROR]: #!#! Running CraftBukkit: false
[15:25:17] [server thread/ERROR]: #!#!
[15:25:17] [server thread/ERROR]: #!#! Current node: null
[15:25:17] [server thread/ERROR]: #!#! Current item: replace "{MESSAGE}" in {_chat}(as java.lang.String) with "%the chat message%"
[15:25:17] [server thread/ERROR]: #!#!
[15:25:17] [server thread/ERROR]: #!#! Thread: Server thread
[15:25:17] [server thread/ERROR]: #!#!
[15:25:17] [server thread/ERROR]: #!#! End of Error.

 

 

skrypt:

 

 

on chat:
    set {_chat} to "{@chat}"
    replace all "{RANG}" with "%{punkty::%player%}%" in {_chat}
    replace all "{DISPLAY}" with "&a%display name of player%" in {_chat}
    replace all "{MESSAGE}" with "&l%message%" in {_chat}
    cancel event
    send "%{_chat}%" to all players

 

1390144171-U592769.png


Opublikowano
on chat:
    cancel event
    set {_chat} to "{@chat}"
    replace all "{RANG}" with "%{punkty::%player%}%" in {_chat}
    replace all "{DISPLAY}" with "&a%display name of player%" in {_chat}
    replace all "{MESSAGE}" with "&l%message%" in {_chat}
    broadcast "%{_chat}%"

Powinno działać.

 

sygnatura.png

  • 9 miesięcy temu...
Opublikowano

ja mam Blad Ktory mnie denerwuje ciagle jest jakis blad i on denerwuje i gracze na serverze nie chcom grac :(


I dostaje Wiadomosci Ze Mam Gupi Server :( jak rozwiazac ten blad


I mnie To Denerwuje

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...