Minetest modding tutorial error

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
User avatar
spheroidal_defence
Red Slime
Posts: 25
Joined: Mon Aug 04, 2014 10:13 pm
Location: CCCP

Minetest modding tutorial error

Post by spheroidal_defence »

I have a very simple question:

Does this sample code in Lua made to show how to add crafting in minetest contain an error?

Code: Select all

minetest.register_craft({
	output = "mymod:diamond_chair 99",
	recipe = {
		{"mymod:diamond_fragments", "", ""},
		{"mymod:diamond_fragments", "mymod:diamond_fragments", ""},
		{"mymod:diamond_fragments", "mymod:diamond_fragments,  ""}
	}
})
It appears they left off a quotation mark in one of the items in the table. Is this as it appears? Have the Minetest tutorials lied to innocent want-to-be modders?

http://rubenwardy.com/minetest_doc/chap ... fting.html
Last edited by spheroidal_defence on Tue Jan 27, 2015 2:36 am, edited 2 times in total.
reinterpret_cast<ClassB>(a);
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7658
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Yep, that is an error. I haven't ever modded Minetest (my second favorite block-world game!) And I have only ever dabbled in Lua, but that is definitely a typo. There is no language I have ever heard of where excluding that quote could be considered correct (not even Forth83!)
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

There are languages where closing quotes at the end of a line are optional (IIRC early versions of FreeBasic; now it prints a warning), but if left off in the middle of a line it can't be made sense of.
rubenwardy
Slime
Posts: 1
Joined: Wed Feb 18, 2015 7:53 pm
Contact:

Post by rubenwardy »

That was a mistake :(

It has been corrected. I should check more carefully!

Next time, if you could report it, that would help gratefully: http://rubenwardy.com/minetest_modding_ ... -this-book
It took Google webmasters' three weeks to notify me about this link. (Sorry for the bump, didn't realize when posting.)
Last edited by rubenwardy on Wed Feb 18, 2015 7:59 pm, edited 1 time in total.
Post Reply