Addbone Posted January 11, 2015 Share Posted January 11, 2015 This is my first time trying to create/mess with a mod and ive been having some trouble. I have all the code written but when i try to load it in game it brings me to a screen saying "/mods/Dark PickAxe/modmain.lua:1: unexpected symbol near 'ï'" and it has failed to load and has been disabled. This is the modmain coding:PrefabFiles = {"dark_pickaxe",} Assets = {Asset("ATLAS", "images/inventoryimages/dark_pickaxe.xml"),} STRINGS = GLOBAL.STRINGSRECIPETABS = GLOBAL.RECIPETABSRecipe = GLOBAL.RecipeTECH = GLOBAL.TECHIngredient = GLOBAL.Ingredient -- GLOBAL.STRINGS.NAMES.DARK_PICKAXE = "Dark Pick/Axe"STRINGS.RECIPE_DESC.DARK_PICKAXE = "Dream Tool." GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.DARK_PICKAXE = "It's a dream come true!" GLOBAL.STRINGS.CHARACTERS.WILLOW.DESCRIBE.DARK_PICKAXE = "It's like my dreams can now help me work!" GLOBAL.STRINGS.CHARACTERS.WOLFGANG.DESCRIBE.DARK_PICKAXE = "Is half-real." GLOBAL.STRINGS.CHARACTERS.WENDY.DESCRIBE.DARK_PICKAXE = "It does not exist." GLOBAL.STRINGS.CHARACTERS.WX78.DESCRIBE.DARK_PICKAXE = "A TOOL TO HACK BOTH ROCK AND TREE" GLOBAL.STRINGS.CHARACTERS.WICKERBOTTOM.DESCRIBE.DARK_PICKAXE = "A bifunctional and transdimensional tool." GLOBAL.STRINGS.CHARACTERS.WOODIE.DESCRIBE.DARK_PICKAXE = "It's... it's just a dream." GLOBAL.STRINGS.CHARACTERS.WAXWELL.DESCRIBE.DARK_PICKAXE = "My style of tool." end local dark_pickaxe = GLOBAL.Recipe("dark_pickaxe",{Ingredient("axe", 1),Ingredient("pickaxe", 1),Ingredient("nightmarefuel", 4)}, RECIPETABS.MAGIC, TECH.SCIENCE_TWO) dark_pickaxe.atlas = "images/inventoryimages/dark_pickaxe.xml" ive also attached the game log to help log.txt i believe you may find the problem at the bottom of the log but i honestly wouldnt know where to look Link to comment Share on other sites More sharing options...
BrotatoTips Posted January 11, 2015 Share Posted January 11, 2015 modmain.lua line 1. try looking there. it says unexpected symbol near ï. so you need to open your modmain, ctrl + f, and find that symbol and look over the code there. also additional equipment mod needs its api changed to 5 for some reason. Link to comment Share on other sites More sharing options...
Blueberrys Posted January 11, 2015 Share Posted January 11, 2015 Hmm. The code you pasted does not contain the problematic symbol, have you been using a rich text editor to code this? That could be the problem. If you don't have any programming-oriented editor, use Notepad (or a simple equivalent), other editors may add hidden symbols to to original file, but don't display them. Edit: also additional equipment mod needs its api changed to 5 for some reason That may be because his game needs updating?api_version for AdditionalEquipment is in the future, please set to the current version. (api_version is version 6, game is version 5.) Link to comment Share on other sites More sharing options...
Addbone Posted January 11, 2015 Author Share Posted January 11, 2015 Hmm. The code you pasted does not contain the problematic symbol, have you been using a rich text editor to code this? That could be the problem. If you don't have any programming-oriented editor, use Notepad (or a simple equivalent), other editors may add hidden symbols to to original file, but don't display them. Edit: That may be because his game needs updating?api_version for AdditionalEquipment is in the future, please set to the current version. (api_version is version 6, game is version 5.)That actually seemed to be the problem! I wrote it up in notepad and got it load in, so i started up a new world and it now crashes right before the first cut scene with maxwell. This was the text from the log: ######### Generating Normal Mode Default Level######## D:/Don't Starve/data/scripts/map/forest_map.lua(221,1) Creating story... D:/Don't Starve/data/scripts/map/storygen.lua(414,1) LinkNodesByKeys D:/Don't Starve/data/scripts/map/forest_map.lua(259,1) Baking map... 350 D:/Don't Starve/data/scripts/map/forest_map.lua(284,1) Map Baked! D:/Don't Starve/data/scripts/map/forest_map.lua(315,1) Encoding... D:/Don't Starve/data/scripts/map/forest_map.lua(319,1) Encoding... DONE D:/Don't Starve/data/scripts/map/forest_map.lua(374,1) Checking Tags D:/Don't Starve/data/scripts/map/forest_map.lua(487,1) Populating voronoi... D:/Don't Starve/data/scripts/map/object_layout.lua(418,1) Warning! Could not find a spot for TeleportatoBaseLayout in node Forest hunters:0:Forest:BG_41 D:/Don't Starve/data/scripts/map/forest_map.lua(527,1) PANIC: missing required prefab! teleportato_base scripts/worldgen_main.lua(527,1) An error occured during world gen we will retry! [ 1 of 5 ] D:/Don't Starve/data/scripts/map/forest_map.lua(221,1) Creating story... D:/Don't Starve/data/scripts/map/storygen.lua(414,1) LinkNodesByKeys D:/Don't Starve/data/scripts/map/forest_map.lua(259,1) Baking map... 350 D:/Don't Starve/data/scripts/map/forest_map.lua(284,1) Map Baked! D:/Don't Starve/data/scripts/map/forest_map.lua(315,1) Encoding... D:/Don't Starve/data/scripts/map/forest_map.lua(319,1) Encoding... DONE D:/Don't Starve/data/scripts/map/forest_map.lua(374,1) Checking Tags D:/Don't Starve/data/scripts/map/forest_map.lua(487,1) Populating voronoi... D:/Don't Starve/data/scripts/map/forest_map.lua(622,1) Done forest map gen! scripts/worldgen_main.lua(246,1) Checking map... scripts/worldgen_main.lua(600,1) Generation complete WorldSim::SimThread::Main() completescripts/gamelogic.lua(116,1) Unload FE scripts/gamelogic.lua(118,1) Unload FE done scripts/mods.lua(258,1) Mod: Dark PickAxe (Dark Pick/Axe) Registering prefabs scripts/mods.lua(264,1) Mod: Dark PickAxe (Dark Pick/Axe) Registering prefab file: prefabs/dark_pickaxe scripts/mods.lua(268,1) Mod: Dark PickAxe (Dark Pick/Axe) dark_pickaxe scripts/mods.lua(281,1) Mod: Dark PickAxe (Dark Pick/Axe) Registering default mod prefab scripts/gamelogic.lua(128,1) LOAD BE scripts/gamelogic.lua(131,1) LOAD BE: done MiniMapComponent::AddAtlas( minimap/minimap_data.xml )scripts/gamelogic.lua(452,1) Loading Nav Grid D:/Don't Starve/data/scripts/components/builder.lua:347: bad argument #1 to 'pairs' (table expected, got nil)LUA ERROR stack traceback: =[C] in function 'pairs' D:/Don't Starve/data/scripts/components/builder.lua(347,1) in function 'CanBuild' D:/Don't Starve/data/scripts/widgets/crafttabs.lua(240,1) in function 'DoUpdateRecipes' D:/Don't Starve/data/scripts/widgets/crafttabs.lua(188,1) in function 'OnUpdate' D:/Don't Starve/data/scripts/frontend.lua(532,1) in function 'Update' D:/Don't Starve/data/scripts/update.lua(46,1)scripts/frontend.lua(717,1) SCRIPT ERROR! Showing error screen Force aborting... Link to comment Share on other sites More sharing options...
Blueberrys Posted January 11, 2015 Share Posted January 11, 2015 @Addbone, something is wrong with your prefabs recipe ingredients. Are you sure you added them?I came across a sample mod which shows how to do it quite clearly.. but I can't seem to find it now.(Seriously bugging me now. If anyone finds it, please let me know) The portion where it's getting stuck (line 351 in builder.lua) (may be line 347 on yours, for some reason):for ik, iv in pairs(recipe.ingredients) doIt couldn't find the "ingredients" child of your "recipe" (it was nil) Link to comment Share on other sites More sharing options...
Addbone Posted January 11, 2015 Author Share Posted January 11, 2015 @BlueberrysThis is currently what i have put in for the recipe:local dark_pickaxe = GLOBAL.Recipe("dark_pickaxe"),{Ingredient("pickaxe", 1),Ingredient("axe", 1),Ingredient("nightmarefuel", 4),},RECIPETABS.MAGIC, TECH.MAGIC_THREE Link to comment Share on other sites More sharing options...
Addbone Posted January 11, 2015 Author Share Posted January 11, 2015 @Blueberrys, Link to comment Share on other sites More sharing options...
Blueberrys Posted January 11, 2015 Share Posted January 11, 2015 @Addbone, hmm. I think you misplaced a bracket. Try this:local dark_pickaxe = GLOBAL.Recipe("dark_pickaxe",{Ingredient("pickaxe", 1),Ingredient("axe", 1),Ingredient("nightmarefuel", 4),},RECIPETABS.MAGIC, TECH.MAGIC_THREE) Link to comment Share on other sites More sharing options...
Addbone Posted January 11, 2015 Author Share Posted January 11, 2015 @Blueberrys, I've finally gotten it to work. I couldnt have asked for better help, thank you for your time and effort Link to comment Share on other sites More sharing options...
Recommended Posts
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.