John Deere Combine Script Help needed !?!

flatbush71flatbush71 Join Date: 2010-07-06 Member: 72275Members
<div class="IPBDescription">Is Decoda what I need to fix it ?</div>Fellows I already know I'm way in over my head by posting here. I'm old and retired and spend my days baby sitting my youngest granddaughter and Running a Sim called Farm Simulator Gold 2009. Well, it has a lot of home made mods (Custom combines , tractors , and such) which most of are busted. Can I use this program to scan the .lua files and in a moment of true clarity and a lot of luck, just might be able to fix one or two of the errors that prevent me from combining or baling hay ? I will patiently await your answer.

Thank You

Buck

Comments

  • ScytheScythe Join Date: 2002-01-25 Member: 46NS1 Playtester, Forum Moderators, Constellation, Reinforced - Silver
    Hi Buck,

    I feel bad telling you this, but Decoda is a tool for programmers. I'm afraid it can't automatically fix errors in the code contained within .lua files.

    Your best bet would be to get in contact with the original authors of those mods and see if they have updated versions of them. Most often the author will include his or her website or email address at the top of the .lua file. You can just open them in notepad to see that information. Another option would be to see if the farm sim gold 2009 community could suggest alternative mods that add the same functionality without the bugs.

    Good luck,

    --Scythe--
  • flatbush71flatbush71 Join Date: 2010-07-06 Member: 72275Members
    edited July 2010
    I got the demo, but can't figure out how to run the debug. The main problem is the error log of the Sim doesn't tell yu what line of code cause the error. If I can locate the mistake I an most times copy and paste another line of code from a similar model (mod ). My grandson the genius (yea,right) says I need a syntax checker for .lua and .xml.
    I do this for fun ( you should see my blood pressure after the fifth crash) and to kill time, so I really wasn't planning on buying anything. What would you recommend for a old fool,that's free. Thank you for your response.

    Buck

    Edit : The section screen on the upper left listing the different parts is very helpful. The error code does list those parts a lot of the time.
  • flatbush71flatbush71 Join Date: 2010-07-06 Member: 72275Members
    Fellas' I got one last problem I would like to ask your help in. Its in some articulated tractors ( bend-in-the-middle). I've fixed a ton of problems, but this one has me totally stumped. And no one where I hag out has any idea. So, please if you would makes so comments or feed back.

    The error Log :

    Error: index out of range
    Callstack:
    dataS/scripts/Utils.lua@8 (printCallstack)
    dataS/scripts/Utils.lua@47 (checkChildIndex)
    C:/Users/Tara/Documents/My Games/FarmingSimulator2009/mods/JD9030/JD9030.lua@233 (indexToObject)
    dataS/scripts/vehicles/Vehicle.lua@489 (load)
    dataS/scripts/BaseMission.lua@414 (new)
    dataS/missions/mission00.lua@313 (loadVehicle)
    dataS/missions/mission00.lua@171 (loadVehicles)
    dataS/scripts/events.lua@50 (load)
    dataS/scripts/gui/LoadingScreen.lua@47 (loadFunction)
    dataS/scripts/gui/menu.lua@297 (update)
    dataS/scripts/main.lua@340 (update)
    Index: 0|0|0|1
    Error: index out of range
    Callstack:
    dataS/scripts/Utils.lua@8 (printCallstack)
    dataS/scripts/Utils.lua@47 (checkChildIndex)
    C:/Users/Tara/Documents/My Games/FarmingSimulator2009/mods/JD9030/JD9030.lua@233 (indexToObject)
    dataS/scripts/vehicles/Vehicle.lua@489 (load)
    dataS/scripts/BaseMission.lua@414 (new)
    dataS/missions/mission00.lua@313 (loadVehicle)
    dataS/missions/mission00.lua@171 (loadVehicles)
    dataS/scripts/events.lua@50 (load)
    dataS/scripts/gui/LoadingScreen.lua@47 (loadFunction)
    dataS/scripts/gui/menu.lua@297 (update)
    dataS/scripts/main.lua@340 (update)
    Index: 1|0|0|1
    Error: index out of range
    Callstack:
    dataS/scripts/Utils.lua@8 (printCallstack)
    dataS/scripts/Utils.lua@47 (checkChildIndex)
    C:/Users/Tara/Documents/My Games/FarmingSimulator2009/mods/JD9030/JD9030.lua@233 (indexToObject)
    dataS/scripts/vehicles/Vehicle.lua@489 (load)
    dataS/scripts/BaseMission.lua@414 (new)
    dataS/missions/mission00.lua@313 (loadVehicle)
    dataS/missions/mission00.lua@171 (loadVehicles)
    dataS/scripts/events.lua@50 (load)
    dataS/scripts/gui/LoadingScreen.lua@47 (loadFunction)
    dataS/scripts/gui/menu.lua@297 (update)
    dataS/scripts/main.lua@340 (update)
    Index: 2|0|0|1
    Error: index out of range
    Callstack:
    dataS/scripts/Utils.lua@8 (printCallstack)
    dataS/scripts/Utils.lua@47 (checkChildIndex)
    C:/Users/Tara/Documents/My Games/FarmingSimulator2009/mods/JD9030/JD9030.lua@233 (indexToObject)
    dataS/scripts/vehicles/Vehicle.lua@489 (load)
    dataS/scripts/BaseMission.lua@414 (new)
    dataS/missions/mission00.lua@313 (loadVehicle)
    dataS/missions/mission00.lua@171 (loadVehicles)
    dataS/scripts/events.lua@50 (load)
    dataS/scripts/gui/LoadingScreen.lua@47 (loadFunction)
    dataS/scripts/gui/menu.lua@297 (update)
    dataS/scripts/main.lua@340 (update)

    Line 229-236 in lua (note 233 error)

    numparts = Utils.getNoNil(getXMLInt(xmlFile, "vehicle.parts#count"), 0);
    self.parts = {};
    for i=1, numparts do
    local partnamei = string.format("vehicle.parts.part%d", i);
    self.parts[i] = Utils.indexToObject(self.components, getXMLString(xmlFile, partnamei .. "#index"));
    setVisibility(self.parts[i], false);
    end;
    self.partsActive = false;

    the parts count in the XML:

    <parts count="4">
    <part1 index="0|0|0|1" />
    <part2 index="1|0|0|1" />
    <part3 index="2|0|0|1" />
    <part4 index="3|0|0|1" />
    </parts>


    Please give me idea what wrong, I just a old man tryin to learn a little.

    Buck
  • ScytheScythe Join Date: 2002-01-25 Member: 46NS1 Playtester, Forum Moderators, Constellation, Reinforced - Silver
    Looks as though it's looping through a list of components, but it tries to access more than there are in the list. Is it possible that one of the components is removed halfway through the loop, so when it gets to the end there were fewer than what there were when it started?

    Try setting a new variable to "Utils.indexToObject(self.components, getXMLString(xmlFile, partnamei .. "#index"));" and then assigning that variable to the location in the array:

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->newVar = Utils.indexToObject(self.components, getXMLString(xmlFile, partnamei .. "#index"));
    self.parts[i] = newVar;<!--c2--></div><!--ec2-->

    That might narrow it down a bit.

    --Scythe--
  • flatbush71flatbush71 Join Date: 2010-07-06 Member: 72275Members
    Ok , Thanks so much.

    Buck
  • ScytheScythe Join Date: 2002-01-25 Member: 46NS1 Playtester, Forum Moderators, Constellation, Reinforced - Silver
    Any luck?

    --Scythe--
  • flatbush71flatbush71 Join Date: 2010-07-06 Member: 72275Members
    Yea, I had to go back to the dual wheels. This is one of a three model set in the same folder sharing the main .lua and some of the textures. It had single balloon tires ,and those four are the outside tires that are not there. So I imported the 8 tire set form one of the others. Here's my photo album of some of my stuff. Decoda is helpful because it arranges things and helps you locate different sections easily. Thank You so much for all of your help. I wish I could afford to buy it, but I,m retired
    I do this just for fun. Most of the guys can't do anything with the busted tractors and such, so I fix what I can so they can use them.

    <a href="http://s690.photobucket.com/albums/vv266/flatbush71/" target="_blank">http://s690.photobucket.com/albums/vv266/flatbush71/</a>

    Thank you again for all your help.
    Buck
Sign In or Register to comment.