Jump to content
The Indie Stone Forums

Failure to work twice

Recommended Posts

As an experiment on my way to something more in depth, I tried:

local function addItems()	
	local player = getSpecificPlayer(0);    -- Java: get player one	
    local inv = player:getInventory();      -- Java: access player inv	
    -- Java: add the actual items to the inventory	


It worked exactly as I expected... But after I reloaded the game (without changing anything) it is now throwing up:


SEVERE: Error found in LUA file: C:/Users/(snip)/Zomboid/mods/OccupationalItemsOnSpawn/media/lua/client/AddItems.lua
java.lang.ArrayIndexOutOfBoundsException: 65022

It worked fine the first time, it's literally just a copy paste of Robomat's tutorial. What could have caused it to stop working if I didn't change anything?
(All other mods are disabled, so totally vanilla minus this)

Any help is appreciated on my way to figuring this stuff out! :)

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...