CreativitEvg Posted January 2, 2015 Share Posted January 2, 2015 My brother and I are trying to create a mod, but we seem to have hit a bump in the road. The mod itself is only in its first stage and far from complete, but we felt it was necessary to test it. As soon as we applied the mod an error appeared. I can't recall it specifically but it had to do with GLOBAL something or other. As you can tell I was not in charge of coding, just the art aspect. Before we started, we downloaded all the necessary tools and previewed a couple youtube tutorials. We tried resolving the problem but we can't seem to figure out what the problem really is. I am sad to see the project come to a full stop so quickly. I became very invested in it. I really don't want to give up, so I would really appreciate some help. If someone can spare some time I will gladly go into more detail. Even a more in depth or step by step tutorial would be a great help. Thank you for your time and I hope to hear back. Link to comment Share on other sites More sharing options...
Kzisor Posted January 2, 2015 Share Posted January 2, 2015 Please post either the error message or the code so that we can give you further assistance, without either we cannot offer much if any assistance. Link to comment Share on other sites More sharing options...
CreativitEvg Posted January 2, 2015 Author Share Posted January 2, 2015 ...s(x86)/Steam/steamapps/common/dont_starve/data/../mods/Rose/modmain.lua:36: '=' expected near 'Global' Link to comment Share on other sites More sharing options...
Kzisor Posted January 2, 2015 Share Posted January 2, 2015 @CreativitEvg, unless you specifically specified Global = GLOBAL at the top, GLOBAL should be all capital. The error is in direct relation to line 36 of modmain.lua file. Double check to make sure that everything is the way it's suppose to be. Link to comment Share on other sites More sharing options...
Mobbstar Posted January 2, 2015 Share Posted January 2, 2015 ...s(x86)/Steam/steamapps/common/dont_starve/data/../mods/Rose/modmain.lua:36: '=' expected near 'Global' use global like this: GLOBAL.variable e.g.: GLOBAL.GetPlayer() You can declare a variable at the top like this: variable = GLOBAL.variable e.g.: GetPlayer = GLOBAL.GetPlayer Link to comment Share on other sites More sharing options...
CreativitEvg Posted January 2, 2015 Author Share Posted January 2, 2015 My sister started this forum as an attempt to help find people who could deal with the problem. The problem has occurred in multiple places as we tried to tempererally bypass the problem by turning the line of code into a comment but the error keeps occurring that the "=" is expected to be near the first word in the line of code. I posted the problem on steam but have seen no replies. Here was the entire post on steam. I have been having problems with a mod that I have been making. After confirming in-game that yes I understand that by using the mod that problems may occur. Then it said that error had occured. So I went into the log and found the error in loading the mod.-------------------------------------------------------------------------------------------------------------scripts/mods.lua(152,1) Loading mod: Rosescripts/mods.lua(179,1) Mod: RoseLoading modworldgenmain.luascripts/mods.lua(187,1) Mod: Rose Mod had no modworldgenmain.lua. Skipping.scripts/mods.lua(179,1) Mod: RoseLoading modmain.luascripts/mods.lua(183,1) Mod: Rose Error loading mod!...s (x86)/Steam/steamapps/common/dont_starve/data/../mods/Rose/modmain.lua:36: '=' expected near 'GLOBAL'-------------------------------------------------------------------------------------------------------------If any coder with more knowledge of .lua formating or with just don't starve modding in general could help me in discoving the problems with my coding, that would be very kind of you. Below is my modmain.lua for the mod and yes I realize I am missing MANY things to describe but I WILL get to that.----------------------------------------------------------------------------------------------------------modmain.luaPrefabFiles = {"ros",}Assets = {Asset( "IMAGE", "images/saveslot_portraits/ros.tex" ),Asset( "ATLAS", "images/saveslot_portraits/ros.xml" ),Asset( "IMAGE", "images/selectscreen_portraits/ros.tex" ),Asset( "ATLAS", "images/selectscreen_portraits/ros.xml" ),Asset( "IMAGE", "images/selectscreen_portraits/ros_silho.tex" ),Asset( "ATLAS", "images/selectscreen_portraits/ros_silho.xml" ),Asset( "IMAGE", "bigportraits/ros.tex" ),Asset( "ATLAS", "bigportraits/ros.xml" ),}-- strings! Any "ROS" below would have to be replaced by the prefab name of your character.-- The character select screen lines-- note: these are lower-case character nameGLOBAL.STRINGS.CHARACTER_TITLES.ros = "The Beautiful Flower"GLOBAL.STRINGS.CHARACTER_NAMES.ros = "Rose" -- Note! This line is especially important as some parts of the game require-- the character to have a valid name.GLOBAL.STRINGS.CHARACTER_DESCRIPTIONS.ros = "Loves ALL flowers."GLOBAL.STRINGS.CHARACTER_DESCRIPTIONS.ros = "Calls her beast with her flower"GLOBAL.STRINGS.CHARACTER_QUOTES.ros = "Lovely"Tools-- You can also add any kind of custom dialogue that you would like. Don't forget to make-- categores that don't exist yet using = {}-- note: these are UPPER-CASE charcacter name GLOBAL.STRINGS.CHARACTERS.ROS = {}GLOBAL.STRINGS.CHARACTERS.ROS.DESCRIBE = {}GLOBAL.STRINGS.CHARACTERS.ROS.DESCRIBE.EVERGREEN = "I love how evergreens stay green all year."GLOBAL.STRINGS.CHARACTERS.ROS.DESCRIBE.FLOWER = "What a beautiful flower!"GLOBAL.STRINGS.CHARACTERS.ROS.DESCRIBE.RABBIT = "BUNNY RABBIT"-- Let the game know Ros is a male, for proper pronouns during the end-game sequence.-- Possible genders here are MALE, FEMALE, or ROBOTtable.insert(GLOBAL.CHARACTER_GENDERS.FEMALE, "ros")AddModCharacter("ros")-----------------------------------------------------------------------------------------------------------------I thank you for any help you can provide. Although the game log says what the problem is as it has done for others it makes absolutely no sence. I realize that this may be extreamly complex and feel free to call me an idiot for not knowing the answer, but I think that other people may also have the same problem as me, thusly it we be both a service to me and them. THANKYOU! Link to comment Share on other sites More sharing options...
Kzisor Posted January 2, 2015 Share Posted January 2, 2015 @CreativitEvg, I think it would be beneficial if you could post the line of code which you are trying to use. Remember that '==' means that it returns true or false and '=' means you are trying to set a variable. Make sure you aren't trying to set a variable in an if statement like the following: if istrue = GLOBAL.istrue then it should be:if istrue == GLOBAL.istrue then I hope this helps some. Link to comment Share on other sites More sharing options...
CreativitEvg Posted January 2, 2015 Author Share Posted January 2, 2015 Thankyou guys for your help. I'm not very familiar with .lua format, but I've gotten past the problem. Thanks again! Thankyou guys for your help. I'm not very familiar with .lua format, but I've gotten past the problem. Thanks again! 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.