Project Zomboid
Hotbar for 5-20 often-used items
exceptions
I asked in the forums what the red box hting that pops up after the latest update is, apparently it;s to show exceptions (lol).

Anyway after a brief discussion with Nasko, he said I should let you know of these exceptions.

I have a bit of knowledge with coding in lua, and I THINK these are false positives? For example. It throws an exception error at me whenever I right click something in the toolbar. Int he console it just says the exception is the creation of the r-click menu.

Everything works as intended, but Nasko said I should still run this by you.

I can copy/paste the exception if you really need it, but I'm sure you already know of this as it happens with every r-click/interaction with the hotbar.

What do computer-code guru?
< >
Показване на 1-15 от 16 коментара
blindcoder  [разработчик] 8 септ. 2015 в 22:56 
Actually I did not know about it. It doesn't happen here.
Can you paste the exception (everything starting from STACK TRACE) somewhere?
I can't copy/paste directy out of the command window is it saved somewhere?
blindcoder  [разработчик] 9 септ. 2015 в 3:53 
Yes, it's in C:/Users/<Your username>/Zomboid/console.txt
This is the stack trace that I get when I right click on something in the bar.

-----------------------------------------
STACK TRACE
-----------------------------------------
function: updateInventory -- file: hotbar_inventorypage.lua line # 204
function: prerender -- file: hotbar_inventorypage.lua line # 292
-------------------------------------------------------------
attempted index: getTexture of non-table: null
-----------------------------------------
STACK TRACE
-----------------------------------------
function: updateInventory -- file: hotbar_inventorypage.lua line # 204
function: prerender -- file: hotbar_inventorypage.lua line # 292
java.lang.RuntimeException: attempted index: getTexture of non-table: null
at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1549)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:623)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1727)
at se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1687)
at se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:38)
at zombie.ui.UIElement.render(UIElement.java:1149)
at zombie.ui.UIManager.render(UIManager.java:618)
at zombie.gameStates.IngameState.renderframeui(IngameState.java:815)
at zombie.gameStates.IngameState.render(IngameState.java:950)
at zombie.gameStates.GameStateMachine.render(GameStateMachine.java:37)
at zombie.GameWindow.render(GameWindow.java:668)
at zombie.GameWindow.run(GameWindow.java:1179)
at zombie.GameWindow.maina(GameWindow.java:974)
at zombie.gameStates.MainScreenState.main(MainScreenState.java:173)
Weird. That does not happen here. Which item is that happening with?
Well, now I'm really confused. I can't get that stack trace to happen anymore. Maybe a mod was installed incorrectly or there was a conflict and I have since removed that mod. I'm not sure.

I have a new Stack Trace though when I right click on an item in the Hotbar. But I am pretty sure this is being caused by a conflict with Hydrocraft since the ISCompassMenu is from that mod. Posting here incase you are interested in looking at it.

-----------------------------------------
STACK TRACE
-----------------------------------------
function: createMenuEntries -- file: ISCompassMenu.lua line # 138
Callframe at: se.krka.kahlua.integration.expose.MultiLuaJavaInvoker@4be238a7
function: createMenu -- file: ISInventoryPaneContextMenu.lua line # 168
function: onRightMouseUp -- file: hotbar_inventorypage.lua line # 124
java.lang.RuntimeException: __len not defined for operand
at se.krka.kahlua.vm.KahluaUtil.fail(KahluaUtil.java:91)
at se.krka.kahlua.vm.KahluaUtil.luaAssert(KahluaUtil.java:79)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:724)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1727)
at se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1672)
at se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:53)
at se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:81)
at zombie.Lua.Event.trigger(Event.java:37)
at zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:141)
at zombie.Lua.LuaEventManager.triggerEventGarbage(LuaEventManager.java:150)
at zombie.Lua.LuaManager$GlobalObject.triggerEvent(LuaManager.java:1647)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at se.krka.kahlua.integration.expose.caller.MethodCaller.call(MethodCaller.java:61)
at se.krka.kahlua.integration.expose.LuaJavaInvoker.call(LuaJavaInvoker.java:199)
at se.krka.kahlua.integration.expose.MultiLuaJavaInvoker.call(MultiLuaJavaInvoker.java:55)
at se.krka.kahlua.vm.KahluaThread.callJava(KahluaThread.java:182)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:983)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1727)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1642)
at se.krka.kahlua.integration.LuaCaller.pcall(LuaCaller.java:63)
at zombie.ui.UIElement.onRightMouseUp(UIElement.java:1112)
at zombie.ui.UIElement.onRightMouseUp(UIElement.java:1074)
at zombie.ui.UIManager.update(UIManager.java:1185)
at zombie.GameWindow.logic(GameWindow.java:572)
at zombie.GameWindow.run(GameWindow.java:1173)
at zombie.GameWindow.maina(GameWindow.java:974)
at zombie.gameStates.MainScreenState.main(MainScreenState.java:173)

Yeah, that's not from my mod. I am not involved with HydroCraft, though. Line 124 in hotbar_inventorypage.lua calls the original PZ function which in turns calls the one from HydroCraft.
It MIGHT be a bug in my code, though, not gonna rule that out. I'll look into it, but if you could report that to HC, that would be great.
Not sure if it would help or not, but just for information. It does not happen if you right click on any items in your normal inventory screen. It only happens if I right click on any item(even vanilla items) in the hotbar. I'm not sure how the code is different between a right click from the standard inventory window vs a right click in the hotbar.
It's very different codepaths (ISInventoryPaneContextMenu vs. ISWorldContextMenu). I'll look into it over the week, won't be having much time until the weekend.
Pls.. Add Russian translite)
UI_RU = {
UI_Hotbar = "Панель",
UI_HotBarPutItemInSlot = "Положить %1 в слот %2",
UI_HotBarReplaceItemInSlotWithItem = "Переложить %1 в слот %2 из слота %3",
UI_optionscreen_binding_Hotbar = "Панель (панель быстрого доступа)",
UI_optionscreen_binding_Toggle_Hotbar = "Переключить Панель",
UI_optionscreen_hotbar_change_size = "Размер Панели",
UI_optionscreen_hotbar_num_slots = "Кол-во слотов",
UI_optionscreen_hotbar_smartaction = "Активация",
UI_optionscreen_smart = "Быстрая (Смарт)",
UI_optionscreen_traditional = "Традиционный",
UI_AlreadyWorn = "Я уже ношу это.",
UI_NotInjured = "У меня нет кровотечения.",
UI_DoNotKnowWhatToDoWith = "Я не знаю, что делать с %1.",
UI_optionscreen_hotbar_title = "ПАНЕЛЬ",
UI_optionscreen_binding_Slot1 = "Слот 1",
UI_optionscreen_binding_Slot2 = "Слот 2",
UI_optionscreen_binding_Slot3 = "Слот 3",
UI_optionscreen_binding_Slot4 = "Слот 4",
UI_optionscreen_binding_Slot5 = "Слот 5",
UI_optionscreen_binding_Slot6 = "Слот 6",
UI_optionscreen_binding_Slot7 = "Слот 7",
UI_optionscreen_binding_Slot8 = "Слот 8",
UI_optionscreen_binding_Slot9 = "Слот 9",
UI_optionscreen_binding_Slot10 = "Слот 10",
UI_optionscreen_binding_Slot11 = "Слот 11",
UI_optionscreen_binding_Slot12 = "Слот 12",
UI_optionscreen_binding_Slot13 = "Слот 13",
UI_optionscreen_binding_Slot14 = "Слот 14",
UI_optionscreen_binding_Slot15 = "Слот 15",
UI_optionscreen_binding_Slot16 = "Слот 16",
UI_optionscreen_binding_Slot17 = "Слот 17",
UI_optionscreen_binding_Slot18 = "Слот 18",
UI_optionscreen_binding_Slot19 = "Слот 19",
UI_optionscreen_binding_Slot20 = "Слот 20",
UI_optionscreen_binding_Slot21 = "Слот 21",
UI_optionscreen_binding_Slot22 = "Слот 22",
UI_optionscreen_binding_Slot23 = "Слот 23",
UI_optionscreen_binding_Slot24 = "Слот 24",
UI_optionscreen_binding_Slot25 = "Слот 25",
UI_optionscreen_binding_Slot26 = "Слот 26",
UI_optionscreen_binding_Slot27 = "Слот 27",
UI_optionscreen_binding_Slot28 = "Слот 28",
UI_optionscreen_binding_Slot29 = "Слот 29",
UI_optionscreen_binding_Slot30 = "Слот 30",
UI_optionscreen_show_contextmenu = "Показывать Панель в контекстном меню:",
UI_optionscreen_show_contextmenu_yes = "Да",
UI_optionscreen_show_contextmenu_no = "Нет (Только Перетаскивание!)",
UI_Clear = "Убрать",
}
Последно редактиран от Лорд Хоботок; 2 юли 2016 в 9:54
Thanks for the translation, I will add it soon!
Първоначално публикувано от blindcoder:
Thanks for the translation, I will add it soon!
Man, keep transfer encoded ANSI. For out of you instead of coding letters:
----------------------------------------
UI_RU = {
UI_Hotbar = "RџR ° RЅRμR" SЊ "
UI_HotBarPutItemInSlot = "RџRѕR" RѕR¶RёS,SЊ% 1 PI SЃR "RѕS, 2%",
UI_HotBarReplaceItemInSlotWithItem = "RџRμSЂRμR" RѕR¶RёS,SЊ% 1 PI SЃR "RѕS, 2% Röhr · SЃR" RѕS,R ° 3% ",
---------------------------
Or I can send you the file
I have added it, can you please check if it work correctly?
When i first saw a red box in the bottom corner with a "30" in it, it nearly made me jump.
Turns out if was just a way of telling the user that a stack trace has popped up in the console and the number shows how many.
Getting Stacktrace error when right-clicking on items in hotbar. With all items, vanilla and mod (hydrocraft):
https://pastebin.com/W3yJfJgV
Besides this error it's working great! :)
< >
Показване на 1-15 от 16 коментара
На страница: 15 30 50