Page 1 of 1

a nil value - error

Posted: Wed Feb 01, 2017 4:24 pm
by Marebre
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

cloneObject{
	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?

Re: a nil value - error

Posted: Wed Feb 01, 2017 4:54 pm
by zimberzimber
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)

Re: a nil value - error

Posted: Wed Feb 01, 2017 4:58 pm
by MrChoke
You are going off of Grimrock 1 info. See this link for Grimrock 2:

http://www.grimrock.net/modding/scripting-reference/

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