Jump to content

Recommended Posts

This lipstick mod ran successfully last week, but it didn't work today.

I got a glance of the in-game view but my WX-78 was not in the screen. Then I had a crash.

The server log says something went wrong with the finiteuses component but I couldn't understand.

Someone please help me out of this bug, many thanks!!!

 

 

 

 

 

Prefab -> dior.lua

 

Spoiler

local assets =
{
    Asset("ANIM", "anim/dior.zip"),
    Asset("ATLAS", "images/inventoryimages/dior.xml"),    
    Asset("IMAGE", "images/inventoryimages/dior.tex"),
}

local function fn()
    local inst = CreateEntity()

    inst.entity:AddTransform()
    inst.entity:AddAnimState()
    inst.entity:AddNetwork()

    MakeInventoryPhysics(inst)

    inst.AnimState:SetBank("dior")
    inst.AnimState:SetBuild("dior")
    inst.AnimState:PlayAnimation("idle")


    if not TheWorld.ismastersim then
        return inst
    end
    inst.entity:SetPristine()

    inst:AddComponent("inspectable")
    inst:AddComponent("inventoryitem")
    inst.components.inventoryitem.atlasname = "images/inventoryimages/dior.xml"
    
    inst:AddComponent("finiteuses")
    inst.components.finiteuses:SetMaxUses(TUNING.DIOR_USES)
    inst.components.finiteuses:SetUses(TUNING.DIOR_USES)
    inst.components.finiteuses:SetOnFinished(inst.Remove)
    
---------------------
    inst:AddComponent("healer")
    inst.components.healer:SetComponent("sanity")
    inst.components.healer:SetHealthAmount(20)--this is the amount of sanity gained
---------------------

    return inst
end


STRINGS.NAMES.DIOR = "dior"
STRINGS.CHARACTERS.GENERIC.DESCRIBE.DIOR = "make you look good"
STRINGS.RECIPE_DESC.DIOR = "top class lipstick"

return Prefab("common/inventory/dior", fn, assets)

 

 

modmain.lua

Spoiler

PrefabFiles = {
"dior",
}

local require = GLOBAL.require
local STRINGS = GLOBAL.STRINGS
local Ingredient = GLOBAL.Ingredient
local RECIPETABS = GLOBAL.RECIPETABS
local Recipe = GLOBAL.Recipe
local TECH = GLOBAL.TECH


--lipsticks
AddRecipe("dior", { Ingredient("cutgrass", 1)}, GLOBAL.RECIPETABS.DRESS, GLOBAL.TECH.NONE, nil, nil, nil, nil, nil, "images/inventoryimages/dior.xml", "dior.tex" )


    AddComponentPostInit("healer", function(self)
    function self:SetComponent(comp)
        self.component = comp
    end

    local oldHeal = self.Heal
    function self:Heal(target)
        if self.component == nil or self.component == "health" then
            return oldHeal(self, target)
        end
        if self.component == "sanity" then
            if target.components.sanity ~= nil then
                target.components.sanity:DoDelta(self.health, false)
                
                if self.inst.components.finiteuses then
                    self.inst.components.finiteuses:Use(1)
                elseif self.inst.components.stackable then
                     self.inst.components.stackable:Get(1):Remove()
                end
                
                return true
            end
        end
    end
end)
 

 

 

 

server_log.txt

Spoiler

[00:00:00]: 
System Memory:
    Memory Load: 29%
    Available Physical Memory: 11394m/16262m
    Available Page File: 13307m/18694m
    Available Virtual Memory: 3942m/4095m
    Available Extended Virtual Memory: 0m
[00:00:00]: 
Process Memory:
    Peak Working Set Size: 29m
    Working Set Size: 29m
    Quota Peak Page Pool Usage: 229k
    Quota Page Pool Usage: 222k
    Quota Peak Non Paged Pool Usage:15k
    Quota Non Paged Pool Usage: 15k
    Page File Usage: 5m
    Peak Page File Usage: 5m
[00:00:00]: PersistRootStorage is now APP:Klei//DoNotStarveTogether/Cluster_3/Master/ 
[00:00:00]: Starting Up
[00:00:00]: Version: 254751
[00:00:00]: Current time: Fri Feb 09 23:10:50 2018

[00:00:00]: Don't Starve Together: 254751 WIN32
[00:00:00]: Build Date: 2892
[00:00:00]: Parsing command line
[00:00:00]: Command Line Arguments: -monitor_parent_process 4136 -persistent_storage_root APP:Klei/ -conf_dir DoNotStarveTogether -cluster Cluster_3 -ownernetid 76561198453578016 -backup_log_count 10 -shard Master -sigprefix DST_Master 
[00:00:00]: Initializing distribution platform
[00:00:00]: Initializing Minidump handler
[00:00:00]: ....Done
[00:00:00]: ....Done
[00:00:00]: Fixing DPI
[00:00:00]: ...Done
[00:00:00]: THREAD - started 'GAClient' (9048)
[00:00:00]: CurlRequestManager::ClientThread::Main()
[00:00:00]: Mounting file system databundles/shaders.zip successful.
[00:00:00]: Mounting file system databundles/fonts.zip successful.
[00:00:00]: Mounting file system databundles/anim_dynamic.zip successful.
[00:00:00]: Mounting file system databundles/bigportraits.zip successful.
[00:00:00]: Mounting file system databundles/images.zip successful.
[00:00:00]: Mounting file system databundles/scripts.zip successful.
[00:00:00]: ProfileIndex:3.28
[00:00:00]: [Connect] PendingConnection::Reset(true)
[00:00:00]: Network tick rate: U=15(2), D=0
[00:00:01]: Network tick rate: U=15(2), D=0
[00:00:01]: [Warning] Authorized application C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Together\bin\dontstarve_dedicated_server_nullrenderer.exe is not setup in the firewall.
[00:00:01]: Authorized application C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Together\bin\dontstarve_dedicated_server_nullrenderer.exe is now enabled in the firewall.
[00:00:01]: OnLoadPermissionList: APP:Klei//DoNotStarveTogether/client_save/blocklist.txt (Failure)
[00:00:01]: THREAD - started 'StreamInput' (3628)
[00:00:01]: OnLoadPermissionList: APP:Klei//DoNotStarveTogether/client_save/adminlist.txt (Failure)
[00:00:01]: OnLoadUserIdList: APP:Klei//DoNotStarveTogether/client_save/whitelist.txt (Failure)
[00:00:01]: Offline user ID: OU_76561198453578016
[00:00:01]: Token retrieved from: APP:Klei//DoNotStarveTogether/Cluster_3/cluster_token.txt
[00:00:01]: Token retrieved from: APP:Klei//DoNotStarveTogether/Cluster_3/cluster_token.txt
[00:00:01]: HardwareStats:
  OS                        
    name                      Microsoft Windows 10 Home
    version                   10.0.16299
    architecture              64-bit
    platformSpecific          SP 0.0
  CPU                       
    numCores                  2
    features                  SSE,SSE2,SSE3,SSSE3,SSE41,SSE42,AVX
    name                      Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
    manufacturer              GenuineIntel
    clockSpeed                2904
  RAM                       
    megsOfRam                 16384
  GPU                       
    name                      NVIDIA GeForce 940MX
    driverDate                20171218000000.000000-000
    megsOfRam                 2048
    refreshRate               0
    videoModeDescription      
    driverVersion             23.21.13.8873

[00:00:01]: cGame::InitializeOnMainThread
[00:00:01]: Renderer initialize: Okay
[00:00:01]: AnimManager initialize: Okay
[00:00:01]: Buffers initialize: Okay
[00:00:01]: cDontStarveGame::DoGameSpecificInitialize()
[00:00:01]: GameSpecific initialize: Okay
[00:00:01]: cGame::StartPlaying
[00:00:01]: LOADING LUA
[00:00:01]: DoLuaFile scripts/main.lua
[00:00:01]: DoLuaFile loading buffer scripts/main.lua
[00:00:01]:   taskgrouplist:    default    Together    
[00:00:01]:   taskgrouplist:    classic    Classic    
[00:00:01]:   taskgrouplist:    cave_default    Underground    
[00:00:01]:   taskgrouplist:    lavaarena_taskset    The Forge    
[00:00:01]: running main.lua
    
[00:00:01]: loaded modindex    
[00:00:01]: ModIndex: Beginning normal load sequence for dedicated server.
    
[00:00:01]: DownloadMods(0)
[00:00:01]: modoverrides.lua enabling dior    
[00:00:01]: ModIndex:GetModsToLoad inserting moddir,     dior    
[00:00:01]: Could not load mod_config_data/modconfiguration_dior_CLIENT    
[00:00:01]: applying configuration_options from modoverrides.lua to mod dior    
[00:00:01]: Loading mod: dior Version:2    
[00:00:01]: Mod: dior    Loading modworldgenmain.lua    
[00:00:01]: Mod: dior      Mod had no modworldgenmain.lua. Skipping.    
[00:00:01]: Mod: dior    Loading modmain.lua    
[00:00:02]: LOADING LUA SUCCESS
[00:00:02]: PlayerDeaths could not load morgue    
[00:00:02]: PlayerHistory could not load player_history    
[00:00:02]: bloom_enabled    false    
[00:00:02]: loaded saveindex    
[00:00:02]: OnFilesLoaded()    
[00:00:02]: OnUpdatePurchaseStateComplete    
[00:00:04]: Mod: dior    Registering prefabs    
[00:00:04]: Mod: dior      Registering prefab file: prefabs/dior    
[00:00:04]: Mod: dior        dior    
[00:00:04]: Mod: dior      Registering default mod prefab    
[00:00:04]:     Load FE    
[00:00:04]:     Load FE: done    
[00:00:04]: THREAD - started 'FilesExistAsyncThread' (11120)
[00:00:04]: FilesExistAsyncThread started (13853 files)...
[00:00:04]: ModIndex: Load sequence finished successfully.    
[00:00:04]: Reset() returning
[00:00:04]: [IPC] Signal 'DST_Master_Kill' opened  #000004DC
[00:00:04]: [IPC] Registering handler for signal #000004DC
[00:00:04]: [IPC] Handle #000004DC added to the Eventhandles
[00:00:04]: [IPC] Signal 'DST_Master_Starting' opened  #000004E4
[00:00:04]: [IPC] Sending signal... #000004E4
[00:00:05]: [200] Account Communication Success (6)
[00:00:05]: Received (KU_V_O7lHWS) from TokenPurpose
[00:00:05]: Starting Dedicated Server Game    
[00:00:05]: Network tick rate: U=15(2), D=0
[00:00:05]: About to start a server with the following settings:
[00:00:05]:   Dedicated: true
[00:00:05]:   Online: true
[00:00:05]:   Passworded: false
[00:00:05]:   ServerPort: 10999
[00:00:05]:   SteamAuthPort: 8766
[00:00:05]:   SteamMasterServerPort: 27016
[00:00:05]:   ClanID: false
[00:00:05]:   ClanOnly: false
[00:00:05]:   ClanAdmin: false
[00:00:05]:   LanOnly: true
[00:00:05]:   FriendsOnly: false
[00:00:05]:   EnableAutosaver: true
[00:00:05]:   EncodeUserPath: true
[00:00:05]:   PVP: false
[00:00:05]:   MaxPlayers: 1
[00:00:05]:   GameMode: survival
[00:00:05]:   OverridenDNS: 
[00:00:05]:   PauseWhenEmpty: true
[00:00:05]:   IdleTimeout: 1800s
[00:00:05]:   VoteEnabled: false
[00:00:05]:   InternetBroadcasting: true
[00:00:05]:   Intent: social
[00:00:05]: [Warning] Could not confirm port 10999 is open in the firewall. 
[00:00:05]: Could not load mod_config_data/modconfiguration_dior    
[00:00:05]: Online Server Started on port: 10999
[00:00:05]: unloading prefabs for mod MOD_dior    
[00:00:05]: Collecting garbage...
[00:00:05]: lua_gc took 0.03 seconds
[00:00:05]: ~ShardLuaProxy()
[00:00:05]: ~ItemServerLuaProxy()
[00:00:05]: ~InventoryLuaProxy()
[00:00:05]: ~NetworkLuaProxy()
[00:00:05]: ~SimLuaProxy()
[00:00:05]: FilesExistAsyncThread aborted.
[00:00:05]: ... FilesExistAsyncThread complete
[00:00:05]: lua_close took 0.11 seconds
[00:00:05]: ReleaseAll
[00:00:05]: ReleaseAll Finished
[00:00:05]: cGame::StartPlaying
[00:00:05]: LOADING LUA
[00:00:05]: DoLuaFile scripts/main.lua
[00:00:05]: DoLuaFile loading buffer scripts/main.lua
[00:00:05]:   taskgrouplist:    default    Together    
[00:00:05]:   taskgrouplist:    classic    Classic    
[00:00:05]:   taskgrouplist:    cave_default    Underground    
[00:00:05]:   taskgrouplist:    lavaarena_taskset    The Forge    
[00:00:06]: running main.lua
    
[00:00:06]: loaded modindex    
[00:00:06]: ModIndex: Beginning normal load sequence for dedicated server.
    
[00:00:06]: modoverrides.lua enabling dior    
[00:00:06]: ModIndex:GetModsToLoad inserting moddir,     dior    
[00:00:06]: Could not load mod_config_data/modconfiguration_dior    
[00:00:06]: applying configuration_options from modoverrides.lua to mod dior    
[00:00:06]: Loading mod: dior Version:2    
[00:00:06]: Mod: dior    Loading modworldgenmain.lua    
[00:00:06]: Mod: dior      Mod had no modworldgenmain.lua. Skipping.    
[00:00:06]: Mod: dior    Loading modmain.lua    
[00:00:06]: LOADING LUA SUCCESS
[00:00:06]: PlayerDeaths could not load morgue    
[00:00:06]: PlayerHistory could not load player_history    
[00:00:06]: bloom_enabled    false    
[00:00:06]: loaded saveindex    
[00:00:06]: OnFilesLoaded()    
[00:00:06]: OnUpdatePurchaseStateComplete    
[00:00:06]: Loading world: session/29C452109D9BE1F9/0000000026    
[00:00:06]: Save file is at version 4.77    
[00:00:06]:     Unload FE    
[00:00:06]:     Unload FE done    
[00:00:08]: Mod: dior    Registering prefabs    
[00:00:08]: Mod: dior      Registering prefab file: prefabs/dior    
[00:00:08]: Mod: dior        dior    
[00:00:08]: Mod: dior      Registering default mod prefab    
[00:00:08]:     LOAD BE    
[00:00:12]:     LOAD BE: done    
[00:00:12]: Begin Session: 29C452109D9BE1F9
[00:00:12]: saving to server_temp/server_save    
[00:00:12]: MiniMapComponent::AddAtlas( minimap/minimap_data.xml )
[00:00:12]: Loading Nav Grid    
[00:00:13]: setting     summerlength    5    
[00:00:13]: setting     isnightmaredawn    false    
[00:00:13]: setting     elapseddaysinseason    3    
[00:00:13]: setting     isfullmoon    false    
[00:00:13]: setting     moisture    0    
[00:00:13]: setting     springlength    20    
[00:00:13]: setting     isnightmarewild    false    
[00:00:13]: setting     moonphase    quarter    
[00:00:13]: setting     precipitationrate    0    
[00:00:13]: setting     iswet    false    
[00:00:13]: setting     isnewmoon    false    
[00:00:13]: setting     iswinter    false    
[00:00:13]: setting     israining    false    
[00:00:13]: setting     isnightmarewarn    false    
[00:00:13]: setting     precipitation    none    
[00:00:13]: setting     cavephase    day    
[00:00:13]: setting     moistureceil    749.61273193359    
[00:00:13]: setting     isday    true    
[00:00:13]: setting     iscaveday    true    
[00:00:13]: setting     season    autumn    
[00:00:13]: setting     timeinphase    0.34845411512587    
[00:00:13]: setting     temperature    32.821026396951    
[00:00:13]: setting     isnightmarecalm    false    
[00:00:13]: setting     isnight    false    
[00:00:13]: setting     isdusk    false    
[00:00:13]: setting     iscavedusk    false    
[00:00:13]: setting     isautumn    true    
[00:00:13]: setting     issnowing    false    
[00:00:13]: setting     iswaxingmoon    true    
[00:00:13]: setting     pop    0    
[00:00:13]: setting     snowlevel    0    
[00:00:13]: setting     issnowcovered    false    
[00:00:13]: setting     autumnlength    50    
[00:00:13]: setting     phase    day    
[00:00:13]: setting     nightmaretime    0    
[00:00:13]: setting     winterlength    5    
[00:00:13]: setting     isspring    false    
[00:00:13]: setting     nightmarephase    none    
[00:00:13]: setting     remainingdaysinseason    47    
[00:00:13]: setting     cycles    3    
[00:00:13]: setting     iscavenight    false    
[00:00:13]: setting     nightmaretimeinphase    0    
[00:00:13]: setting     wetness    0    
[00:00:13]: setting     time    0.2613405863444    
[00:00:13]: setting     issummer    false    
[00:00:13]: OVERRIDE: setting    regrowth    to    veryfast    
[00:00:13]: OVERRIDE: setting    disease_delay    to    none    
[00:00:13]: OVERRIDE: setting    lightning    to    never    
[00:00:13]: OVERRIDE: setting    day    to    longday    
[00:00:13]: OVERRIDE: setting    perd    to    never    
[00:00:13]: OVERRIDE: setting    weather    to    never    
[00:00:13]: OVERRIDE: setting    beefaloheat    to    rare    
[00:00:13]: OVERRIDE: setting    petrification    to    none    
[00:00:18]: Reconstructing topology    
[00:00:18]:     ...Sorting points    
[00:00:18]:     ...Sorting edges    
[00:00:18]:     ...Connecting nodes    
[00:00:18]:     ...Validating connections    
[00:00:18]:     ...Housekeeping    
[00:00:18]:     ...Done!    
[00:00:18]: 1 uploads added to server. From server_temp
[00:00:18]: About to start a shard with these settings:
[00:00:18]:   ShardName: [SHDMASTER]
[00:00:18]:   ShardID: 1
[00:00:18]:   ShardRole: MASTER
[00:00:18]:   MasterHost: (null)
[00:00:18]:   MasterBind: 127.0.0.1
[00:00:18]:   MasterPort: 10888
[00:00:18]: [Shard] Starting master server
[00:00:18]: [Warning] Could not confirm port 10888 is open in the firewall. 
[00:00:18]: [Shard] Shard server started on port: 10888
[00:00:18]: [IPC] Signal 'DST_Master_Ready' opened  #0000057C
[00:00:18]: [IPC] Sending signal... #0000057C
[00:00:18]: Telling Client our new session identifier: 29C452109D9BE1F9
[00:00:18]: ModIndex: Load sequence finished successfully.    
[00:00:18]: Reset() returning
[00:00:18]: [Steam] SteamGameServer_Init(8766, 10999, 27016)
[00:00:18]: [Steam] SteamGameServer_Init success
[00:00:18]: Validating portal[2] <-> 202492049[2] (inactive)    
[00:00:18]: Validating portal[4] <-> 202492049[4] (inactive)    
[00:00:18]: Validating portal[9] <-> 202492049[9] (inactive)    
[00:00:18]: Validating portal[6] <-> 202492049[6] (inactive)    
[00:00:18]: Validating portal[10] <-> 202492049[10] (inactive)    
[00:00:18]: Validating portal[8] <-> 202492049[8] (inactive)    
[00:00:18]: Validating portal[3] <-> 202492049[3] (inactive)    
[00:00:18]: Validating portal[1] <-> 202492049[1] (inactive)    
[00:00:18]: Validating portal[5] <-> 202492049[5] (inactive)    
[00:00:18]: Validating portal[7] <-> 202492049[7] (inactive)    
[00:00:19]: Sim paused
[00:00:21]: [Shard] Slave Caves(202492049) connected: [LAN] 127.0.0.1
[00:00:22]: [Shard] Slave Caves(202492049) ready!
[00:00:22]: World 202492049 is now connected    
[00:00:22]: Validating portal[2] <-> 202492049[2] (disabled)    
[00:00:22]: Validating portal[4] <-> 202492049[4] (disabled)    
[00:00:22]: Validating portal[9] <-> 202492049[9] (disabled)    
[00:00:22]: Validating portal[6] <-> 202492049[6] (disabled)    
[00:00:22]: Validating portal[10] <-> 202492049[10] (disabled)    
[00:00:22]: Validating portal[8] <-> 202492049[8] (disabled)    
[00:00:22]: Validating portal[3] <-> 202492049[3] (disabled)    
[00:00:22]: Validating portal[1] <-> 202492049[1] (disabled)    
[00:00:22]: Validating portal[5] <-> 202492049[5] (disabled)    
[00:00:22]: Validating portal[7] <-> 202492049[7] (disabled)    
[00:00:23]: New incoming connection 127.0.0.1|62075 <8863475020753898242>
[00:00:23]: Client connected from [LAN] 127.0.0.1|62075 <8863475020753898242>
[00:00:23]: ValidateGameSessionToken pgs-usc^KU_V_O7lHWS^DontStarveTogether^yV1ertlfhU2kATKSgGy1LtB3WJoEy8GnqzADHbbWiQE= for <8863475020753898242>
[00:00:24]: Client authenticated: (KU_V_O7lHWS) nicknightyx
[00:00:24]: [Steam] Authenticated host '76561198453578016'
[00:00:24]: [Shard] Read save location file for (KU_V_O7lHWS)
[00:00:31]: Resuming user: session/29C452109D9BE1F9/A7JVUO3RQ60S/0000000026
[00:00:31]: [string "scripts/components/finiteuses.lua"]:60: attempt to perform arithmetic on field 'current' (a nil value)
LUA ERROR stack traceback:
scripts/components/finiteuses.lua:60 in (method) GetPercent (Lua) <59-61>
   self =
      consumption = table: 08B09230
      inst = 116267 -  (valid:true)
scripts/components/finiteuses.lua:35 in (method) SetUses (Lua) <32-42>
   self =
      consumption = table: 08B09230
      inst = 116267 -  (valid:true)
   val = nil
   was_positive = true
../mods/dior/scripts/prefabs/dior.lua:33 in (field) fn (Lua) <8-43>
   inst = 116267 -  (valid:true)
scripts/mainfunctions.lua:207 in () ? (Lua) <196-238>
   name = dior
   prefab = Prefab dior - 
=[C]:-1 in (method) SpawnPrefab (C) <-1--1>
scripts/mainfunctions.lua:255 in (global) SpawnPrefab (Lua) <249-257>
   name = dior
   skin = nil
   skin_id = nil
   creator = nil
scripts/mainfunctions.lua:261 in (global) SpawnSaveRecord (Lua) <259-301>
   saved = table: 098B9C28
   newents = nil
scripts/components/inventory.lua:164 in (method) OnLoad (Lua) <159-191>
   self =
      ignoreoverflow = false
      ignoresound = false
      isopen = false
      dropondeath = false
      opencontainers = table: 0CC94B38
      isvisible = false
      silentfull = false
      inst = 116262 - wx78 (valid:true)
      equipslots = table: 0CC94ED0
      isloading = true
      ignorefull = false
      _ = table: 0CC94F20
      itemslots = table: 0CC94D40
   data = table: 098B9AC0
   newents = nil
   k = 2
   v = table: 098B9C28
scripts/entityscript.lua:1568 in (method) SetPersistData (Lua) <1559-1576>
   self (valid:true) =
      DynamicShadow = DynamicShadow (08E7AF78)
      inlimbo = false
      GetMoistureRateScale = function - scripts/prefabs/player_common.lua:146
      SetCameraDistance = function - scripts/prefabs/player_common.lua:954
      ScreenFlash = function - scripts/prefabs/player_common.lua:1016
      player_classified = 116263 - player_classified (valid:true)
      playercolour = table: 08B10148
      jointask = PERIODIC 116262: 0.000000
      level = 5
      Light = Light (08E7AFD8)
      OnRemoveEntity = function - scripts/prefabs/player_common.lua:630
      pendingtasks = table: 098AA278
      ShowHUD = function - scripts/prefabs/player_common.lua:936
      ShowGiftItemPopUp = function - scripts/prefabs/player_common.lua:948
      sg = sg="wilson", state="idle", time=0.00, tags = "idle,canrotate,"
      IsHUDVisible = function - scripts/prefabs/player_common.lua:926
      ApplyScale = function - scripts/prefabs/player_common.lua:1031
      SetGhostMode = function - scripts/prefabs/player_common.lua:543
      ShowActions = function - scripts/prefabs/player_common.lua:930
      OnWakeUp = function - scripts/prefabs/player_common.lua:803
      Transform = Transform (08E7AED8)
      actionreplica = table: 098A99B8
      event_listening = table: 098AA390
      actioncomponents = table: 098A9800
      lower_components_shadow = table: 098A96E8
      GetMaxMoisture = function - scripts/prefabs/player_common.lua:136
      CanUseTouchStone = function - scripts/prefabs/player_common.lua:86
      updatecomponents = table: 098AB948
      ShakeCamera = function - scripts/prefabs/player_common.lua:974
      OnDespawn = function - scripts/prefabs/player_common.lua:825
      Physics = Physics (08E7AF38)
      MiniMapEntity = MiniMapEntity (08E7ACD8)
      event_listeners = table: 098AA408
      _OnLoad = function - scripts/prefabs/wx78.lua:138
      charge_time = 0
      GetTemperature = function - scripts/prefabs/player_common.lua:96
      GUID = 116262
      starting_inventory = table: 0D29E230
      ghostenabled = true
      EnableMovementPrediction = function - scripts/prefabs/player_common.lua:499
      worldstatewatching = table: 098AABB0
      SetCameraZoomed = function - scripts/prefabs/player_common.lua:960
      Network = Network (08E7AEF8)
      userid = KU_V_O7lHWS
      OnPreLoad = function - scripts/prefabs/player_common.lua:704
      LightWatcher = LightWatcher (08E7AF98)
      inherentactions = table: 0A4E6870
      spawntime = 0.1333333
[00:00:31]: [string "scripts/components/finiteuses.lua"]:60: attempt to perform arithmetic on field 'current' (a nil value)
LUA ERROR stack traceback:
    scripts/components/finiteuses.lua:60 in (method) GetPercent (Lua) <59-61>
    scripts/components/finiteuses.lua:35 in (method) SetUses (Lua) <32-42>
    ../mods/dior/scripts/prefabs/dior.lua:33 in (field) fn (Lua) <8-43>
    scripts/mainfunctions.lua:207 in () ? (Lua) <196-238>
    =[C]:-1 in (method) SpawnPrefab (C) <-1--1>
    scripts/mainfunctions.lua:255 in (global) SpawnPrefab (Lua) <249-257>
    scripts/mainfunctions.lua:261 in (global) SpawnSaveRecord (Lua) <259-301>
    scripts/components/inventory.lua:164 in (method) OnLoad (Lua) <159-191>
    scripts/entityscript.lua:1568 in (method) SetPersistData (Lua) <1559-1576>
    scripts/mainfunctions.lua:1389 in () ? (Lua) <1385-1397>
    
[00:00:31]: SpawnSaveRecord [nil, dior] FAILED    
[00:00:31]: SpawnSaveRecord [nil, dior] FAILED    
[00:00:31]: SpawnSaveRecord [nil, dior] FAILED    
[00:00:31]: Spawning player at: [Load] (121.25, 0.00, 171.30)    
[00:00:31]: Sim unpaused
 

 

Edited by nicknightyx

What is TUNING.DIOR_USES?

The error report says its a nil value.

You could either define TUNING.DIOR_USES in modmain.lua like below

local TUNING = GLOBAL.TUNING

TUNING.DIOR_USES = 5 --whatever number of uses you want to be able to use.

Alternatively you could just set it as a number instead of a variable

Cheers,

Iron_Hunter

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...