[scarpet] Error when using command suggester, after reloading script
replaceitem opened this issue ยท 2 comments
With the following script, there is some odd behaviour going on when using the command suggester.
playerlist(a) -> map(player('all'),_~'command_name');
__config() -> {
'stay_loaded' -> true,
'scope' -> 'global',
'commands' -> {
'<pl>'->'give'
},
'arguments' -> {
'pl' -> {
'type' -> 'term',
'suggester' -> 'playerlist'
}
}
};
give(player) -> (
null
);
With the script installed, after I do /reload
or /script unload/load
, when I enter the command, and put a space after it (which should trigger the suggester) there aren't any suggestions, and this error:
Error executing task on Server
carpet.script.exception.IntegrityException: Module structure changed for the app. Did you reload the app with tasks running?
at carpet.script.ScriptHost.getModuleData(ScriptHost.java:304) ~[fabric-carpet-1.17.1-1.4.53+v211111.jar:?]
at carpet.script.ScriptHost.assertAppIntegrity(ScriptHost.java:310) ~[fabric-carpet-1.17.1-1.4.53+v211111.jar:?]
at carpet.script.CarpetScriptHost.call(CarpetScriptHost.java:847) ~[fabric-carpet-1.17.1-1.4.53+v211111.jar:?]
at carpet.script.CarpetScriptHost.lambda$handleCommand$21(CarpetScriptHost.java:713) ~[fabric-carpet-1.17.1-1.4.53+v211111.jar:?]
at carpet.script.utils.GlocalFlag.whileValueReturn(GlocalFlag.java:42) ~[fabric-carpet-1.17.1-1.4.53+v211111.jar:?]
at carpet.script.utils.GlocalFlag.getWhileDisabled(GlocalFlag.java:28) ~[fabric-carpet-1.17.1-1.4.53+v211111.jar:?]
at carpet.script.CarpetScriptHost.handleCommand(CarpetScriptHost.java:713) ~[fabric-carpet-1.17.1-1.4.53+v211111.jar:?]
at carpet.script.command.CommandArgument.getOptions(CommandArgument.java:395) ~[fabric-carpet-1.17.1-1.4.53+v211111.jar:?]
at carpet.script.command.CommandArgument$StringArgument.getOptions(CommandArgument.java:468) ~[fabric-carpet-1.17.1-1.4.53+v211111.jar:?]
at carpet.script.command.CommandArgument.suggestFor(CommandArgument.java:375) ~[fabric-carpet-1.17.1-1.4.53+v211111.jar:?]
at carpet.script.command.CommandArgument.suggest(CommandArgument.java:369) ~[fabric-carpet-1.17.1-1.4.53+v211111.jar:?]
at carpet.script.command.CommandArgument.lambda$argumentNode$41(CommandArgument.java:292) ~[fabric-carpet-1.17.1-1.4.53+v211111.jar:?]
at com.mojang.brigadier.tree.ArgumentCommandNode.listSuggestions(ArgumentCommandNode.java:71) ~[intermediary-server.jar:?]
at com.mojang.brigadier.CommandDispatcher.getCompletionSuggestions(CommandDispatcher.java:598) ~[intermediary-server.jar:?]
at com.mojang.brigadier.CommandDispatcher.getCompletionSuggestions(CommandDispatcher.java:580) ~[intermediary-server.jar:?]
at net.minecraft.class_3244.method_12059(class_3244.java:471) ~[intermediary-server.jar:?]
at net.minecraft.class_2805.method_12147(class_2805.java:29) ~[intermediary-server.jar:?]
at net.minecraft.class_2805.method_11054(class_2805.java:7) ~[intermediary-server.jar:?]
at net.minecraft.class_2600.method_11072(class_2600.java:21) ~[intermediary-server.jar:?]
at net.minecraft.class_3738.run(class_3738.java:18) ~[intermediary-server.jar:?]
at net.minecraft.class_1255.method_18859(class_1255.java:151) ~[intermediary-server.jar:?]
at net.minecraft.class_4093.method_18859(class_4093.java:23) ~[intermediary-server.jar:?]
at net.minecraft.server.MinecraftServer.method_24306(MinecraftServer.java:788) ~[intermediary-server.jar:?]
at net.minecraft.server.MinecraftServer.method_18859(MinecraftServer.java:164) ~[intermediary-server.jar:?]
at net.minecraft.class_1255.method_16075(class_1255.java:125) ~[intermediary-server.jar:?]
at net.minecraft.server.MinecraftServer.method_20415(MinecraftServer.java:770) ~[intermediary-server.jar:?]
at net.minecraft.server.MinecraftServer.method_16075(MinecraftServer.java:764) ~[intermediary-server.jar:?]
at net.minecraft.class_1255.method_18857(class_1255.java:134) ~[intermediary-server.jar:?]
at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer.java:749) ~[intermediary-server.jar:?]
at net.minecraft.server.MinecraftServer.handler$zbe000$modifiedRunLoop(MinecraftServer.java:2899) ~[intermediary-server.jar:?]
at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:676) ~[intermediary-server.jar:?]
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270) ~[intermediary-server.jar:?]
at java.lang.Thread.run(Thread.java:831) [?:?]
I then tried restarting the server, and after the script autoloaded on restart, it worked perfectly fine. However, when i then did /reload
or /script unload
-> /script load
again, using the command suggester was broken again.
Duplicate of #996.