John Deere Combine Script Help needed !?!

flatbush71flatbush71 Join Date: 2010-07-06 Member: 72275Members Posts: 5
Is Decoda what I need to fix it ?
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 Posts: 4,371 mod
    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--
    image
    "Show me an operation that is running smoothly and I'll show you someone who's covering up mistakes. Real boats rock." - Frank Herbert
    image PAPT
  • flatbush71flatbush71 Join Date: 2010-07-06 Member: 72275Members Posts: 5
    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 Posts: 5
    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/[email protected] (printCallstack)
    dataS/scripts/[email protected] (checkChildIndex)
    C:/Users/Tara/Documents/My Games/FarmingSimulator2009/mods/JD9030/[email protected] (indexToObject)
    dataS/scripts/vehicles/[email protected] (load)
    dataS/scripts/[email protected] (new)
    dataS/missions/[email protected] (loadVehicle)
    dataS/missions/[email protected] (loadVehicles)
    dataS/scripts/[email protected] (load)
    dataS/scripts/gui/[email protected] (loadFunction)
    dataS/scripts/gui/[email protected] (update)
    dataS/scripts/[email protected] (update)
    Index: 0|0|0|1
    Error: index out of range
    Callstack:
    dataS/scripts/[email protected] (printCallstack)
    dataS/scripts/[email protected] (checkChildIndex)
    C:/Users/Tara/Documents/My Games/FarmingSimulator2009/mods/JD9030/[email protected] (indexToObject)
    dataS/scripts/vehicles/[email protected] (load)
    dataS/scripts/[email protected] (new)
    dataS/missions/[email protected] (loadVehicle)
    dataS/missions/[email protected] (loadVehicles)
    dataS/scripts/[email protected] (load)
    dataS/scripts/gui/[email protected] (loadFunction)
    dataS/scripts/gui/[email protected] (update)
    dataS/scripts/[email protected] (update)
    Index: 1|0|0|1
    Error: index out of range
    Callstack:
    dataS/scripts/[email protected] (printCallstack)
    dataS/scripts/[email protected] (checkChildIndex)
    C:/Users/Tara/Documents/My Games/FarmingSimulator2009/mods/JD9030/[email protected] (indexToObject)
    dataS/scripts/vehicles/[email protected] (load)
    dataS/scripts/[email protected] (new)
    dataS/missions/[email protected] (loadVehicle)
    dataS/missions/[email protected] (loadVehicles)
    dataS/scripts/[email protected] (load)
    dataS/scripts/gui/[email protected] (loadFunction)
    dataS/scripts/gui/[email protected] (update)
    dataS/scripts/[email protected] (update)
    Index: 2|0|0|1
    Error: index out of range
    Callstack:
    dataS/scripts/[email protected] (printCallstack)
    dataS/scripts/[email protected] (checkChildIndex)
    C:/Users/Tara/Documents/My Games/FarmingSimulator2009/mods/JD9030/[email protected] (indexToObject)
    dataS/scripts/vehicles/[email protected] (load)
    dataS/scripts/[email protected] (new)
    dataS/missions/[email protected] (loadVehicle)
    dataS/missions/[email protected] (loadVehicles)
    dataS/scripts/[email protected] (load)
    dataS/scripts/gui/[email protected] (loadFunction)
    dataS/scripts/gui/[email protected] (update)
    dataS/scripts/[email protected] (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 = Utils.indexToObject(self.components, getXMLString(xmlFile, partnamei .. "#index"));
    setVisibility(self.parts, 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 Posts: 4,371 mod
    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:

    CODE
    newVar = Utils.indexToObject(self.components, getXMLString(xmlFile, partnamei .. "#index"));
    self.parts[i] = newVar;


    That might narrow it down a bit.

    --Scythe--
    image
    "Show me an operation that is running smoothly and I'll show you someone who's covering up mistakes. Real boats rock." - Frank Herbert
    image PAPT
  • flatbush71flatbush71 Join Date: 2010-07-06 Member: 72275Members Posts: 5
    Ok , Thanks so much.

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

    --Scythe--
    image
    "Show me an operation that is running smoothly and I'll show you someone who's covering up mistakes. Real boats rock." - Frank Herbert
    image PAPT
  • flatbush71flatbush71 Join Date: 2010-07-06 Member: 72275Members Posts: 5
    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.

    http://s690.photobucket.com/albums/vv266/flatbush71/

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