Alpacas Posted April 9, 2015 Share Posted April 9, 2015 I've been working on a mod for a custom character of Wirt from Over the Garden Wall but cant find the problem in the code that keeps making it crash. I got him to work without his hat but when I added the hat I just cant fix it. The hat uses the top hat as a template. This is the error logscripts/modindex.lua(239,1) WARNING loading modinfo.lua: wit does not specify if it is compatible with the base game. It may not work properly. scripts/modindex.lua(242,1) WARNING loading modinfo.lua: wit does not specify if it is compatible with Reign of Giants. It may not work properly. scripts/modindex.lua(242,1) WARNING loading modinfo.lua: workshop-240775044 does not specify if it is compatible with Reign of Giants. It may not work properly. scripts/modindex.lua(239,1) WARNING loading modinfo.lua: workshop-262217260 does not specify if it is compatible with the base game. It may not work properly. scripts/modindex.lua(242,1) WARNING loading modinfo.lua: workshop-334327000 does not specify if it is compatible with Reign of Giants. It may not work properly. scripts/modindex.lua(386,1) Could not load mod_config_data/modconfiguration_wit scripts/mods.lua(152,1) Loading mod: wit (Wirt) scripts/mods.lua(179,1) Mod: wit (Wirt) Loading modworldgenmain.lua scripts/mods.lua(187,1) Mod: wit (Wirt) Mod had no modworldgenmain.lua. Skipping. scripts/mods.lua(179,1) Mod: wit (Wirt) Loading modmain.lua LOADING LUA SUCCESSscripts/playerdeaths.lua(79,1) PlayerDeaths loaded morgue 4498 scripts/playerprofile.lua(480,1) loaded profile scripts/playerprofile.lua(544,1) bloom_enabled false scripts/saveindex.lua(99,1) loaded saveindex scripts/gamelogic.lua(1172,1) OnFilesLoaded() scripts/gamelogic.lua(1161,1) OnUpdatePurchaseStateComplete scripts/gamelogic.lua(111,1) FE assets already loaded scripts/mods.lua(269,1) Mod: wit (Wirt) Registering prefabs scripts/mods.lua(275,1) Mod: wit (Wirt) Registering prefab file: prefabs/wit scripts/mods.lua(17,1) error calling LoadPrefabFile in mod wit (Wirt): ...ps/common/dont_starve/data/scripts/mainfunctions.lua:71: Error loading file prefabs/wit...am/steamapps/common/dont_starve/data/../mods/wit/scripts/prefabs/wit.lua:61: 'end' expected (to close 'function' at line 41) near '<eof>'LUA ERROR stack traceback: =[C] in function 'assert' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/mainfunctions.lua(71,1) =(tail call) ? =[C] in function 'xpcall' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/mods.lua(15,1) C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/mods.lua(276,1) in function 'RegisterPrefabs' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/gamelogic.lua(115,1) in function 'LoadAssets' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/gamelogic.lua(1153,1) in function 'DoResetAction' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/gamelogic.lua(1168,1) in function 'complete_callback' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/upsell.lua(27,1) in function 'UpdateGamePurchasedState' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/gamelogic.lua(1173,1) ... =[C] in function 'GetPersistentString' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/saveindex.lua(91,1) in function 'Load' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/gamelogic.lua(1189,1) in function 'callback' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/playerprofile.lua(574,1) in function 'Set' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/playerprofile.lua(458,1) =[C] in function 'GetPersistentString' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/playerprofile.lua(456,1) in function 'Load' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/gamelogic.lua(1188,1) in main chunk =[C] in function 'require' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/mainfunctions.lua(652,1) scripts/mods.lua(226,1) Disabling wit (Wirt) because it had an error. scripts/frontend.lua(723,1) SCRIPT ERROR! Showing error screen scripts/mods.lua(275,1) Mod: wit (Wirt) Registering prefab file: prefabs/hat_wit scripts/mods.lua(279,1) Mod: wit (Wirt) hat_wit scripts/mods.lua(292,1) Mod: wit (Wirt) Registering default mod prefab ...m/steamapps/common/dont_starve/data/scripts/util.lua:289: bad argument #1 to 'gsub' (string expected, got nil)LUA ERROR stack traceback: =[C] in function 'gsub' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/util.lua(289,1) in function 'softresolvefilepath' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/util.lua(275,1) in function 'resolvefilepath' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/mainfunctions.lua(52,1) in function 'RegisterPrefabs' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/mods.lua(294,1) in function 'RegisterPrefabs' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/gamelogic.lua(115,1) in function 'LoadAssets' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/gamelogic.lua(1153,1) in function 'DoResetAction' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/gamelogic.lua(1168,1) in function 'complete_callback' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/upsell.lua(27,1) in function 'UpdateGamePurchasedState' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/gamelogic.lua(1173,1) =[C] in function 'SetPersistentString' ... =[C] in function 'GetPersistentString' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/saveindex.lua(91,1) in function 'Load' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/gamelogic.lua(1189,1) in function 'callback' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/playerprofile.lua(574,1) in function 'Set' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/playerprofile.lua(458,1) =[C] in function 'GetPersistentString' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/playerprofile.lua(456,1) in function 'Load' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/gamelogic.lua(1188,1) in main chunk =[C] in function 'require' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/mainfunctions.lua(652,1)scripts/modindex.lua(85,1) ModIndex: Load sequence finished successfully. Reset() returningForce aborting... Link to comment Share on other sites More sharing options...
Blueberrys Posted April 9, 2015 Share Posted April 9, 2015 @Alpacas"...am/steamapps/common/dont_starve/data/../mods/wit/scripts/prefabs/wit.lua:61: 'end' expected (to close 'function' at line 41) near '<eof>'"Check between line 41-61, you're missing an "end" somewhere. Link to comment Share on other sites More sharing options...
Alpacas Posted April 9, 2015 Author Share Posted April 9, 2015 I added some ends but I no nadda about coding and it didnt work This is the code starting at 41 in the wit.lualocal fn = function(inst) local start_inv ={ "hat_wit",} local fn = function(inst) -- choose which sounds this character will play inst.soundsname = "wilson" -- a minimap icon must be specified inst.MiniMapEntity:SetIcon( "wilson.png" ) -- todo: Add an example special power here.return MakePlayerCharacter("wit", prefabs, assets, fn, start_inv )endI attached the file of the mod if that'd help wit.zip Link to comment Share on other sites More sharing options...
Alpacas Posted April 9, 2015 Author Share Posted April 9, 2015 Thank you for helping btw. I really appreciate it Link to comment Share on other sites More sharing options...
Mobbstar Posted April 9, 2015 Share Posted April 9, 2015 I added some ends but I no nadda about coding and it didnt work This is the code starting at 41 in the wit.luaI attached the file of the mod if that'd help wit.zip move that "return" stuff down to the very bottom Link to comment Share on other sites More sharing options...
Alpacas Posted April 9, 2015 Author Share Posted April 9, 2015 move that "return" stuff down to the very bottomDone. Still crashes. Error log seems mostly the same...ps/common/dont_starve/data/scripts/mainfunctions.lua:71: Error loading file prefabs/wit...am/steamapps/common/dont_starve/data/../mods/wit/scripts/prefabs/wit.lua:59: 'end' expected (to close 'function' at line 41) near '<eof>'LUA ERROR stack traceback: Link to comment Share on other sites More sharing options...
Mobbstar Posted April 9, 2015 Share Posted April 9, 2015 Done. Still crashes. Error log seems mostly the sameremove the first line, it's a duplicate from the one below it seems. Link to comment Share on other sites More sharing options...
Blueberrys Posted April 9, 2015 Share Posted April 9, 2015 @Alpacas Fixedlocal start_inv ={ "hat_wit",}local fn = function(inst) -- choose which sounds this character will play inst.soundsname = "wilson" -- a minimap icon must be specified inst.MiniMapEntity:SetIcon( "wilson.png" ) -- todo: Add an example special power here.endreturn MakePlayerCharacter("wit", prefabs, assets, fn, start_inv ) Link to comment Share on other sites More sharing options...
Alpacas Posted April 9, 2015 Author Share Posted April 9, 2015 @mobbstar I think that fixed that problem since the log is different now (still crashed though)@blueberrys I have the same thing now but I'm still getting crashesscripts/modindex.lua(239,1) WARNING loading modinfo.lua: wit does not specify if it is compatible with the base game. It may not work properly. scripts/modindex.lua(242,1) WARNING loading modinfo.lua: wit does not specify if it is compatible with Reign of Giants. It may not work properly. scripts/modindex.lua(242,1) WARNING loading modinfo.lua: workshop-240775044 does not specify if it is compatible with Reign of Giants. It may not work properly. scripts/modindex.lua(239,1) WARNING loading modinfo.lua: workshop-262217260 does not specify if it is compatible with the base game. It may not work properly. scripts/modindex.lua(242,1) WARNING loading modinfo.lua: workshop-334327000 does not specify if it is compatible with Reign of Giants. It may not work properly. scripts/modindex.lua(386,1) Could not load mod_config_data/modconfiguration_wit scripts/mods.lua(152,1) Loading mod: wit (Wirt) scripts/mods.lua(179,1) Mod: wit (Wirt) Loading modworldgenmain.lua scripts/mods.lua(187,1) Mod: wit (Wirt) Mod had no modworldgenmain.lua. Skipping. scripts/mods.lua(179,1) Mod: wit (Wirt) Loading modmain.lua LOADING LUA SUCCESSscripts/playerdeaths.lua(79,1) PlayerDeaths loaded morgue 4498 scripts/playerprofile.lua(480,1) loaded profile scripts/playerprofile.lua(544,1) bloom_enabled false scripts/saveindex.lua(99,1) loaded saveindex scripts/gamelogic.lua(1172,1) OnFilesLoaded() scripts/gamelogic.lua(1161,1) OnUpdatePurchaseStateComplete scripts/gamelogic.lua(111,1) FE assets already loaded scripts/mods.lua(269,1) Mod: wit (Wirt) Registering prefabs scripts/mods.lua(275,1) Mod: wit (Wirt) Registering prefab file: prefabs/wit scripts/mods.lua(279,1) Mod: wit (Wirt) wit scripts/mods.lua(275,1) Mod: wit (Wirt) Registering prefab file: prefabs/hat_wit scripts/mods.lua(279,1) Mod: wit (Wirt) hat_wit scripts/mods.lua(292,1) Mod: wit (Wirt) Registering default mod prefab ...m/steamapps/common/dont_starve/data/scripts/util.lua:289: bad argument #1 to 'gsub' (string expected, got nil)LUA ERROR stack traceback: =[C] in function 'gsub' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/util.lua(289,1) in function 'softresolvefilepath' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/util.lua(275,1) in function 'resolvefilepath' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/mainfunctions.lua(52,1) in function 'RegisterPrefabs' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/mods.lua(294,1) in function 'RegisterPrefabs' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/gamelogic.lua(115,1) in function 'LoadAssets' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/gamelogic.lua(1153,1) in function 'DoResetAction' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/gamelogic.lua(1168,1) in function 'complete_callback' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/upsell.lua(27,1) in function 'UpdateGamePurchasedState' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/gamelogic.lua(1173,1) =[C] in function 'SetPersistentString' ... =[C] in function 'GetPersistentString' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/saveindex.lua(91,1) in function 'Load' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/gamelogic.lua(1189,1) in function 'callback' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/playerprofile.lua(574,1) in function 'Set' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/playerprofile.lua(458,1) =[C] in function 'GetPersistentString' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/playerprofile.lua(456,1) in function 'Load' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/gamelogic.lua(1188,1) in main chunk =[C] in function 'require' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/mainfunctions.lua(652,1)scripts/frontend.lua(723,1) SCRIPT ERROR! Showing error screen scripts/modindex.lua(85,1) ModIndex: Load sequence finished successfully. Reset() returning Link to comment Share on other sites More sharing options...
Mobbstar Posted April 9, 2015 Share Posted April 9, 2015 In your modmain there's a spare set of swirly brackets { }} remove the spare } Link to comment Share on other sites More sharing options...
Alpacas Posted April 9, 2015 Author Share Posted April 9, 2015 @mobbstarWorked till I launched a game log says ..\source\animlib\animmanager.cpp(401) :: Tried to add build [hat_top] from file [anim/hat_top.zip] but we've already added a build with that name!I assume I have to change the build of the hat? What should I change it to. That hat uses the top hat as a template. Link to comment Share on other sites More sharing options...
Alpacas Posted April 9, 2015 Author Share Posted April 9, 2015 inst.AnimState:SetBank("tophat") inst.AnimState:SetBuild("hat_wit") inst.AnimState:PlayAnimation("anim") Link to comment Share on other sites More sharing options...
Alpacas Posted April 9, 2015 Author Share Posted April 9, 2015 I realized I didnt use the build renamer and thats what it was talking about. I renamed the build.bin file and got in the game without crashing but got this error message Link to comment Share on other sites More sharing options...
Alpacas Posted April 10, 2015 Author Share Posted April 10, 2015 Changed some things with comparing it to another mod and now i have this error instead Link to comment Share on other sites More sharing options...
Alpacas Posted April 10, 2015 Author Share Posted April 10, 2015 I got it to work. This is how he looks rn (gotta change some things still since the hat doesn't look right) Thanks for your help! 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.