We have detected that cookies are not enabled on your browser. Please enable cookies to ensure the proper experience.
Results 1 to 7 of 7
  1. #1

    SortPack plugin error

    It's my understanding that sorting by category is currently broken in lotro in some way, is that correct?

    Anyway, I'm trying out the SortPack plugin on lotro interface and am getting the following error:

    ...ings Online\Plugins\JackdawPlugins\ SortPack\Main.lua:13 5: attempt to concatenate field '?' (a nil value)

    What does this mean? LUA isn't exactly my strong suit. The addon options work fine, the sorting doesn't. I'm not surprised, because I heard that it's broken. I'm just curious what exactly this error message means, especially since apparently there are others using the addon with few problems and it actually does sort.

  2. #2
    Join Date
    Mar 2007
    Posts
    1,158

    Re: SortPack plugin error

    Quote Originally Posted by Jozlin View Post
    It's my understanding that sorting by category is currently broken in lotro in some way, is that correct?

    Anyway, I'm trying out the SortPack plugin on lotro interface and am getting the following error:

    ...ings Online\Plugins\JackdawPlugins\ SortPack\Main.lua:13 5: attempt to concatenate field '?' (a nil value)

    What does this mean? LUA isn't exactly my strong suit. The addon options work fine, the sorting doesn't. I'm not surprised, because I heard that it's broken. I'm just curious what exactly this error message means, especially since apparently there are others using the addon with few problems and it actually does sort.
    That error indicates that a concatenation operation was attempted on a variable which had a nil value - "nil" in Lua programming terms means that it has no value, which is not the same as an empty string. There are a number of item categories which exist in the game but are not in the ItemCategory enumeration - I posted a thread on that quite a while back which is now buried somewhere in the Current API Issues & Discussion forum.

    I haven't looked at SortPack so I have no idea what mechanism the author is using for sorting by item category but it is certainly possible to sort by item category - for example, AltInventory allows both sorting and filtering by item category. It's just that undefined categories have to be trapped and handled (I chose to list them as "undefined"). It all depends on how the individual author has implemented their sort functionality.

    The best course of action is to post on LoTROInterface the error message you are getting along with whatever user interaction you were performing when it occurred, either as a comment on the plugin download page, as a bug report if the author has a portal set up, or under the "Released Interfaces" forum so that the author will be informed and can fix the error. Believe it or not, many authors like to hear from their users when something goes wrong - users often use plugins in ways that the author hadn't anticipated or in environments that the author hasn't tested so bug reports often help authors to improve their product.
    Last edited by Garan; May 06 2011 at 03:51 PM.

  3. #3

    Re: SortPack plugin error

    Thanks for your reply. I've posted a bug report on the author's page, I just thought I'd ask here what the error means. Thanks again.

  4. #4

    Re: SortPack plugin error

    Quote Originally Posted by Garan View Post
    "nil" in Lua programming terms means that it has no value, which is not the same as an empty string.
    Well in most languages that's true, but Lua doesn't comprehend the term "empty string" it just sees a variable with no value, and calls it nil. If you declare a new variable as an empty string, and then attempt to add to that string using concatenation, it will throw that exact same error.
    [CENTER][IMG]http://i.imgur.com/wK9A7aa.png[/IMG]

    [SIZE=1][B][COLOR=white]75[/COLOR][/B] Fourohfour | [B][COLOR=white]75[/COLOR][/B] Artemedis | [COLOR=Blue][B]60[/B][/COLOR] Whiskeytango Foxtrot | [B][COLOR=#00ca00]50[/COLOR][/B] Mistah Boombastic | [B][COLOR=#00ca00]56[/COLOR][/B] Appetizer | [B][COLOR=#a7a7a7]25[/COLOR][/B] Aggromi | [B][COLOR=blue]61[/COLOR][/B] Onepointtwentyone Gigawatts [/SIZE] [/CENTER]

  5. #5
    Join Date
    Mar 2007
    Posts
    1,158

    Re: SortPack plugin error

    Quote Originally Posted by Digital_Utopia View Post
    Well in most languages that's true, but Lua doesn't comprehend the term "empty string" it just sees a variable with no value, and calls it nil. If you declare a new variable as an empty string, and then attempt to add to that string using concatenation, it will throw that exact same error.
    Perhaps I've misunderstood what you meant, but in Lua an empty string is not nil. The code:
    Code:
    test1="";
    test1=test1.."abc";
    sets a variable to an empty string and then adds to it by concatentation and does not generate any error.

  6. #6

    Re: SortPack plugin error

    Quote Originally Posted by Garan View Post
    Perhaps I've misunderstood what you meant, but in Lua an empty string is not nil. The code:
    Code:
    test1="";
    test1=test1.."abc";
    sets a variable to an empty string and then adds to it by concatentation and does not generate any error.
    My mistake, I confused it with another issue I had some time ago - perhaps it was attempting to do concatenation with a variable you haven't explicitly given a string value to before. I do know I've gotten that error before in the process of concatenating strings, using a method that works in other scripting languages.

    But yeah, you're right - and all I had to do is look at my recent code before posting, and I wouldn't have posted

    Code:
        local dstring="";
        for i=1,depth do
            dstring=dstring.."   ";
        end
    [CENTER][IMG]http://i.imgur.com/wK9A7aa.png[/IMG]

    [SIZE=1][B][COLOR=white]75[/COLOR][/B] Fourohfour | [B][COLOR=white]75[/COLOR][/B] Artemedis | [COLOR=Blue][B]60[/B][/COLOR] Whiskeytango Foxtrot | [B][COLOR=#00ca00]50[/COLOR][/B] Mistah Boombastic | [B][COLOR=#00ca00]56[/COLOR][/B] Appetizer | [B][COLOR=#a7a7a7]25[/COLOR][/B] Aggromi | [B][COLOR=blue]61[/COLOR][/B] Onepointtwentyone Gigawatts [/SIZE] [/CENTER]

  7. #7
    Join Date
    Aug 2010
    Location
    Lancaster, England
    Posts
    14

    Re: SortPack plugin error

    Hello all! Thanks for the help - got SortPack working now.

    For those working on Backpack plugins - I got round some of the problems by using a time delay before moving an item.

    Oh! And Garan - I used the categories you found, and forgot to credit you. I have changed the plugin description. Thanks for your work!

 

 

Posting Permissions

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

This form's session has expired. You need to reload the page.

Reload