Solved YamlConfiguration Error

Discussion in 'Spigot Plugin Development' started by PSminKo, May 29, 2016.

  1. 11:43:04 in 'string', line 165, column 18:
    11:43:04 EntrouEmCombate:'&6[ImperioMine] &7Voce entrou em ...
    11:43:04 ^
    11:43:04 expected alphabetic or numeric character, but found [(91)
    11:43:04 in 'string', line 165, column 20:
    11:43:04 EntrouEmCombate:'&6[ImperioMine] &7Voce entrou em & ...
    11:43:04 ^

    How to resolve this?
     
  2. semd us ur code maybe
     
  3. Close your Strings..
     
  4. My Strings are closes.

    #################################
    ### CombatLog ###
    #################################
    Segundos: 10
    EntrouEmCombate:'&6[ImperioMine] &7Voce entrou em &cCombate! &7Para ver se esta em Combate &b/Combat.'
    ArregouEmCombate:'&6[ImperioMine] &[email protected]&7 Deslogou em Combate e um Noob!'
    SaiuDoCombate:'&6[ImperioMine] &7Voce saiu do &cCombate! &7Pode Deslogar agora.'
    VoceEstaEmCombate:'&6[Imperiomine] &7Voce esta em &cCombate&7 por mais &[email protected] Segundos!'
    VoceNaoEstaEmCombate:'&6[Imperiomine] &7Voce nao esta em &cCombate!'
    NaoPodeUssarEsseComandoEmCombat:'&6[ImperioMine] &7Nao pode ussar esse Comando em &cCombate!'
     
  5. Full error?
     
  6. 11:55:51 in 'string', line 165, column 18:
    11:55:51 EntrouEmCombate:'&6[ImperioMine] &7Voce entrou em ...
    11:55:51 ^
    11:55:51 expected alphabetic or numeric character, but found [(91)
    11:55:51 in 'string', line 165, column 20:
    11:55:51 EntrouEmCombate:'&6[ImperioMine] &7Voce entrou em & ...
    11:55:51 ^
    11:55:51 at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:57) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    11:55:51 at org.bukkit.plugin.java.JavaPlugin.reloadConfig(JavaPlugin.java:209) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    11:55:51 at org.bukkit.plugin.java.JavaPlugin.getConfig(JavaPlugin.java:157) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    11:55:51 at Main.PSKitPvPMain.<init>(PSKitPvPMain.java:151) [PSIKitPvP.jar:?]
    11:55:51 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [?:1.7.0_79]
    11:55:51 at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) [?:1.7.0_79]
    11:55:51 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) [?:1.7.0_79]
    11:55:51 at java.lang.reflect.Constructor.newInstance(Unknown Source) [?:1.7.0_79]
    11:55:51 at java.lang.Class.newInstance(Unknown Source) [?:1.7.0_79]
    11:55:51 at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:76) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    11:55:51 at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:129) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    11:55:51 at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:336) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    11:55:51 at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:258) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    11:55:51 at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugins(CraftServer.java:369) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    11:55:51 at net.minecraft.server.v1_7_R4.DedicatedServer.init(DedicatedServer.java:152) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    11:55:51 at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:458) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    11:55:51 at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    11:55:51 Caused by: org.yaml.snakeyaml.scanner.ScannerException: while scanning an anchor; expected alphabetic or numeric character, but found [(91); in 'string', line 165, column 20:
    11:55:51 EntrouEmCombate:'&6[ImperioMine] &7Voce entrou em & ...
    11:55:51 ^
    11:55:51 at org.yaml.snakeyaml.scanner.ScannerImpl.scanAnchor(ScannerImpl.java:1446) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    11:55:51 at org.yaml.snakeyaml.scanner.ScannerImpl.fetchAnchor(ScannerImpl.java:939) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    11:55:51 at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:370) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    11:55:51 at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:226) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    11:55:51 at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:558) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    11:55:51 at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    11:55:51 at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:143) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    11:55:51 at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:230) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    11:55:51 at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:159) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    11:55:51 at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:237) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    11:55:51 at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:159) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    11:55:51 at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:122) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    11:55:51 at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    11:55:51 at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:120) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    11:55:51 at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:481) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    11:55:51 at org.yaml.snakeyaml.Yaml.load(Yaml.java:400) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    11:55:51 at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:55) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    11:55:51 ... 16 more
     
  7. Add spaced after the string so:

    string: 'A example'

    And try using " instead
     
  8. not resolved
     
  9. As TheBlackTeddy said adding a space between the key and value and surrounding your strings with double quotes should fix it.
    Code (Text):

    ArregouEmCombate: "&6[ImperioMine] &[email protected]&7 Deslogou em Combate e um Noob!"
    EntrouEmCombate: "&6[ImperioMine] &7Voce entrou em &cCombate! &7Para ver se esta em Combate &b/Combat."
    NaoPodeUssarEsseComandoEmCombat: "&6[ImperioMine] &7Nao pode ussar esse Comando em &cCombate!"
    SaiuDoCombate: "&6[ImperioMine] &7Voce saiu do &cCombate! &7Pode Deslogar agora."
    Segundos: 10
    VoceEstaEmCombate: "&6[Imperiomine] &7Voce esta em &cCombate&7 por mais &[email protected] Segundos!"
    VoceNaoEstaEmCombate: "&6[Imperiomine] &7Voce nao esta em &cCombate!"
     
     
  10. Thanks, i resolved this Error. This error was because de string before i forget to finish '
     
    #10 PSminKo, May 29, 2016
    Last edited: May 30, 2016