Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

officialpinq

I've come across an error and I need help

8 posts in this topic

so basically I've been trying so hard to make a mod

I finally made one but now it gives me an ERROR here is all the code

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

AddRecipe("mandrake",  {Ingredient("livinglog", 1), Ingredient("carrot", 2), RECIPETABS.FOOD, TECH.SCIENCE_ONE)
STRINGS.RECIPE_DESC.MANDRAKE = "a Living Plant."
AddRecipe("wormlight",  {Ingredient("lightbulb", 2), Ingredient("berries", 1), RECIPETABS.FOOD, TECH.SCIENCE_ONE)
STRINGS.RECIPE_DESC.WORMLIGHT = "hmm? a Glowing Vegetable?"
AddRecipe("gears",  {Ingredient("rope", 1), Ingredient("flint", 2),Ingredient("goldnugget", 1), RECIPETABS.SCIENCE, TECH.SCIENCE_ONE)
STRINGS.RECIPE_DESC.GEARS = "Clink! Clank!"
AddRecipe("livinglog",  {Ingredient("livinglog", 1), Ingredient("nightmarefuel", 1), RECIPETABS.REFINE, TECH.SCIENCE_ONE)
STRINGS.RECIPE_DESC.LIVINGLOG = "Avada Kedavra! *poof* a Magical Stump!"
AddRecipe("houndstooth",  {Ingredient("stinger", 2), Ingredient("boneshard", 1), RECIPETABS.REFINE, TECH.SCIENCE_ONE)
STRINGS.RECIPE_DESC.HOUNDSTOOTH = "Pesky ol' teeth!"
AddRecipe("meat",  {Ingredient("smallmeat", 2), RECIPETABS.FOOD, TECH.SCIENCE_ONE)
STRINGS.RECIPE_DESC.MEAT = "Don't? err Starve I guess!"
AddRecipe("nightmarefuel",  {Ingredient("spoiled_food", 4), RECIPETABS.MAGIC, TECH.SCIENCE_ONE)
STRINGS.RECIPE_DESC.NIGHTMAREFUEL = "Witchcraft, I assume?!"
AddRecipe("steelwool",  {Ingredient("transistor", 2), Ingredient("beefalowool", 4), {Ingredient("rope", 1), RECIPETABS.REFINE, TECH.SCIENCE_TWO)
STRINGS.RECIPE_DESC.STEELWOOL = "no moe mama mucus! Hallelujah"
AddRecipe("armorruins",  {Ingredient("thulecite_pieces", 16), Ingredient("armorwood", 1), {Ingredient("rope", 2), RECIPETABS.FIGHT, TECH.SCIENCE_TWO)
STRINGS.RECIPE_DESC.ARMORRUINS = "nifty piece of armor, eh?"
AddRecipe("butter",  {Ingredient("butterflywings", 2), Ingredient("honey", 2), RECIPETABS.FOOD, TECH.SCIENCE_TWO)
STRINGS.RECIPE_DESC.BUTTER = "Butter, is a necessity!"

that is modmain.lua

name = "CraftPlus"
description = "Crafting has never been better!"
author = "SaltMouth"
version = "1.0.0"

forumthread = ""

-- This lets other players know if your mod is out of date, update it to match the current version in the game
api_version = 10

-- Can specify a custom icon for this mod!
icon_atlas = ""
icon = ""

-- Specify compatibility with the game!
dont_starve_compatible = true
reign_of_giants_compatible = true
dst_compatible = true
all_clients_require_mod = true

that is modinfo.lua

 

I've placed it inside of a folder and I called the folder _craftplus

if someone can resolve my issue that would be amazing

Share this post


Link to post
Share on other sites

no good formattin and no crash log. sorry. for formatting use "code" <> sign. and log.txt is in documents/klei/dontstarve/

Share this post


Link to post
Share on other sites
4 hours ago, Amalleus said:

no good formattin and no crash log. sorry. for formatting use "code" <> sign. and log.txt is in documents/klei/dontstarve/

I couldn't find the log but I took a screenshot

http://prntscr.com/efxnxq

Share this post


Link to post
Share on other sites

so check all your { and }. it must be beginning { and closing }. error log says that you lost closing } on line 7. since formatting is weird i can't normally read this code

Share this post


Link to post
Share on other sites

AddRecipe("mandrake",  {Ingredient("livinglog", 1), Ingredient("carrot", 2)}, RECIPETABS.FOOD, TECH.SCIENCE_ONE)

Do this for each recipe you forgot to close the table for.

Share this post


Link to post
Share on other sites
1 hour ago, Amalleus said:

so check all your { and }. it must be beginning { and closing }. error log says that you lost closing } on line 7. since formatting is weird i can't normally read this code

 

13 minutes ago, CarlZalph said:

AddRecipe("mandrake",  {Ingredient("livinglog", 1), Ingredient("carrot", 2)}, RECIPETABS.FOOD, TECH.SCIENCE_ONE)

Do this for each recipe you forgot to close the table for.

Thank you so much!

I'll see if this works and make an edit if I get an error or if It works

EDIT: come across another error http://prntscr.com/efyvw9

Share this post


Link to post
Share on other sites
19 hours ago, officialpinq said:

 

Thank you so much!

I'll see if this works and make an edit if I get an error or if It works

EDIT: come across another error http://prntscr.com/efyvw9

it is not another error. it is same error but on 21 line. can't you really read it?

Share this post


Link to post
Share on other sites
2 hours ago, Amalleus said:

it is not another error. it is same error but on 21 line. can't you really read it?

don't worry it's already fixed I forgot to edit the error but it wasn't what you were thinking it was

I had to change the entire code because add recipe didn't work

so I did this: local mandrake = GLOBAL.Recipe("mandrake", {Ingredient("livinglog", 1), Ingredient("carrot", 2) }, RECIPETABS.FOOD, TECH.SCIENCE_ONE)

 

Share this post


Link to post
Share on other sites