Project Zomboid

Project Zomboid

FuelAPI
Bilibili_Noob May 11, 2023 @ 11:11am
Error: Every time when i click right mouse button on barrel , the game report this
STACK TRACE
-----------------------------------------
function: addFuelTooltip -- file: CustomFuelObject.lua line # 136 | MOD: Fuel API
function: onFillWorldObjectContextMenu -- file: CustomFuelObject.lua line # 172 | MOD: Fuel API
Callframe at: se.krka.kahlua.integration.expose.MultiLuaJavaInvoker@9e26e70b
function: createMenu -- file: ISWorldObjectContextMenu.lua line # 1543 | Vanilla
function: createMenu -- file: ISMenuContextWorld.lua line # 50 | Vanilla
function: createWorldMenu -- file: ISContextManager.lua line # 28 | Vanilla
function: doRClick -- file: ISObjectClickHandler.lua line # 60 | Vanilla
function: onObjectRightMouseButtonUp -- file: ISObjectClickHandler.lua line # 379 | Vanilla
< >
Showing 1-6 of 6 comments
Tharuviel May 23, 2023 @ 7:40am 
I'm having the same error, however it only happens when I have a completely empty gas can in my inventory, is it the same issue for you?
Bowel Disruptor May 28, 2023 @ 4:52pm 
Originally posted by Tharuviel:
I'm having the same error, however it only happens when I have a completely empty gas can in my inventory, is it the same issue for you?

Same issue as above ^
Francis Oct 26, 2023 @ 7:57am 
Same.
Rayxnor131 Oct 28, 2023 @ 3:34am 
Originally posted by PeterMain:
STACK TRACE
-----------------------------------------
function: addFuelTooltip -- file: CustomFuelObject.lua line # 136 | MOD: Fuel API
function: onFillWorldObjectContextMenu -- file: CustomFuelObject.lua line # 172 | MOD: Fuel API
Callframe at: se.krka.kahlua.integration.expose.MultiLuaJavaInvoker@9e26e70b
function: createMenu -- file: ISWorldObjectContextMenu.lua line # 1543 | Vanilla
function: createMenu -- file: ISMenuContextWorld.lua line # 50 | Vanilla
function: createWorldMenu -- file: ISContextManager.lua line # 28 | Vanilla
function: doRClick -- file: ISObjectClickHandler.lua line # 60 | Vanilla
function: onObjectRightMouseButtonUp -- file: ISObjectClickHandler.lua line # 379 | Vanilla
I have the same issue. Pls if anyone subscribed to this mod knows what's going on or has a solution pls let us know. This is bugging me so bad. Pls @ us
urthemoon Jan 14, 2024 @ 1:55pm 
@PeterMain
@Tharuviel
@Bowel
@Fitshugh
@Rayxnor131
SOLLUTION:
1) find CustomFuelObject.lua in \Zomboid\mods\FuelAPI\media\lua\client\FuelAPI
2) open it with app Notepad++
3) find local function addFuelTooltip on line 132
4) replace the whole function with this:
local function addFuelTooltip(option, petrolcan) local tooltip = ISToolTip:new(); tooltip:setName(petrolcan:getDisplayName()); local tx = getTextManager():MeasureStringX(tooltip.font, getText("ContextMenu_FuelName") .. ":") + 20; local capacity; if petrolcan:hasTag("EmptyPetrol") then capacity = 0; elseif not petrolcan:hasTag("EmptyPetrol") then capacity = 1 / petrolcan:getUseDelta(); end local fuelAmount if petrolcan:hasTag("EmptyPetrol") then fuelAmount = 0; elseif not petrolcan:hasTag("EmptyPetrol") then fuelAmount = capacity * petrolcan:getUsedDelta(); end if fuelAmount == -1 then fuelAmount = 0; end tooltip:setTexture(petrolcan:getTexture():getName()); tooltip.description = string.format("%s: <SETX:%d> %d / %d", getText("ContextMenu_FuelName"), tx, fuelAmount, capacity); tooltip.maxLineWidth = 512; option.toolTip = tooltip; end
i hope it helps
Last edited by urthemoon; Jan 14, 2024 @ 11:12pm
Borger Feb 17, 2024 @ 8:35pm 
@urthemoon
Thank you! No more error message popping up. Unfortunately, it still wasn't the reason my large gas cans weren't taking fuels out of barrels.
< >
Showing 1-6 of 6 comments
Per page: 1530 50