a nil value - error

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
User avatar
Posts: 5
Joined: Wed Feb 01, 2017 4:12 pm

a nil value - error

Post by Marebre » Wed Feb 01, 2017 4:24 pm

So I'm getting this error. In order to pinpoint it, I've done the following:

1) Made a brand new dungeon project (File->New)

2) Opened "items.lua"

3) Copy-pasted code from official site into "items.lua"

Code: Select all

	name = "super_machete",
	baseObject = "machete",
	uiName = "Super Machete",
	attackPower = 12,
	damageType = "shock",
	description = "This machete radiates with strange energy.",
4) Reopened dungeon

I get the following error:
attempt to call a global 'cloneObject' (a nil value)
Running on Windows 7. What am I missing?

User avatar
Posts: 432
Joined: Fri Feb 08, 2013 8:06 pm

Re: a nil value - error

Post by zimberzimber » Wed Feb 01, 2017 4:54 pm

You were viewing the Legend of Grimrock 1 tutorial.
cloneObject does not exist in LoG2. (There's a custom plugin somewhere on the forum someone made that integrates it)
My asset pack [v1.10]
Features a bit of everything! :D

Posts: 324
Joined: Sat Oct 25, 2014 7:20 pm

Re: a nil value - error

Post by MrChoke » Wed Feb 01, 2017 4:58 pm

You are going off of Grimrock 1 info. See this link for Grimrock 2:


cloneObject() is now "defineObject". Go to Asset Definitions section on that page for more info.

Post Reply