1. #1

    Database Issues in Custom Ruleset

    I'm in the process of creating a custom Ruleset for AD&D 2E (I'm aware of the existing project, but I prefer to do things my own way). The issue I'm encountering is with when I load any Weapon or access the Weapon's tab. Because range in 2E didn't have increments, and nearly every ranged weapon has 2-3 ranges, I changed range to a String, the idea being to parse the numerical values from the String by recognizing the slash(es) (I've gone through every DB file to make sure that it's changed everywhere. However, I still get a type mismatch error. I've not been able to find where the control for this is, though to fix it. I've also tried going through the CoreRPG Ruleset (I started by copying the 3.5 Ruleset) looking to see if it was something hard-coded there with no success.

    This is the error that comes up:
    Ruleset Error: windowcontrol: Database type mismatch for control (range) in windowclass (reference_grouplist_groupitem)
    ScriptError: [string "ref/scripts/ref_groupledlist_groupitem.lua"]:58 attempt to index local 'cField' (a nil value)


    After verifying the database changes, I went through the script trying to find the issue, but I can't find where it's specified that the control needs to be a number. Are they inherently numbers, or is there something I've missed?
    Last edited by Dave0910; January 2nd, 2019 at 22:14.

  2. #2
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    18,749
    Blog Entries
    1
    The error messages are telling you where the errors are.

    contrl (range) in windowclass (reference_grouplist_groupitem) is not correct
    Fix that first then your second error may be fixed
    Otherwise look in the named script ref/scripts/ref_groupledlist_groupitem.lua on line 58 and see why cField is nil.

    MoreCore - Generic Ruleset
    --- Projects ---
    Extensions | Tutorials | MoreCore | MoreCore Themes | Call of Cthulhu | Maelstrom | FG Con

  3. #3
    I'd already checked the script, which had been a massive problem, since it's part of the CoreRPG Ruleset, and I copied from 3.5.

    I'd scrolled past it 50 times without seeing the issue, and probably still wouldn't have seen it if I hadn't scrapped everything to start again from scratch. The error was caused, because in record_item.xml, I'd simply copied/pasted entries and changed the name, failing to notice that there were both <string_columnh> and <number_columnh> tags. I finally managed to track it down after finding nothing in several tutorials when I got the same error from Rate of Fire, as well as the fact that Speed Factor was entering as a string. The plus side to all of this is I now know the the items section of the database inside and out, having gone over all of the equipmint/item files line-by-line about 50 times.

  4. #4
    BTW, I never updated this. The scripting and the item template were fine. The reason i was getting the error was that I had entered 1 item before making the change, so it was giving me the error when it loaded the old item with a mismatched data type.
    Last edited by Dave0910; June 15th, 2019 at 22:46. Reason: Typo

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Log in

Log in