Results 1 to 3 of 3

Thread: Error when modifying table: cannot convert a table to a clr type System.String

  1. #1

    Error when modifying table: cannot convert a table to a clr type System.String

    I created a global table (in the global lua)

    gearBags = {}


    And on one of the bag objects, I'm trying to add to the table guid and a status in the onload function:

    gearBags = Global.getTable('gearBags')
    gearBags[self.guid] = 'recalled'
    Global.setTable(gearBags)


    But, I'm getting an error:

    function <onload>: chunk_111,11-29): cannot convert a table to a clr type System.Stringchunk_111,11-29): cannot convert a table to a clr type System.String


    Any help for what I'm doing wrong here would be greatly appreciated. Thanks!

  2. #2
    setTable method takes two arguments - table name to be saved and actual table object. So it should be Global.setTable('gearBags', gearBags).

  3. #3
    Oh man.. I should have caught that.. That was it - thanks a ton for the quick response!

Similar Threads

  1. Change table image without reloading table
    By onelivesleft in forum Scripting Suggestions
    Replies: 0
    Last Post: 07-11-2017, 09:53 AM
  2. Replies: 2
    Last Post: 01-20-2017, 06:00 PM
  3. Replies: 3
    Last Post: 10-04-2016, 03:02 PM
  4. New Joint Type - String
    By GoldenH in forum Suggestions
    Replies: 1
    Last Post: 06-25-2016, 03:41 PM
  5. table weight (cant flip a marble table troll!)
    By jay_rab in forum General Discussion
    Replies: 0
    Last Post: 03-18-2014, 05:55 AM

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
  •