OK, i officially hate tables now. im getting an error with this code (in globals):
im using this code to call it from on Preload:Code:function LoadDeck(user) ldTable = {} ldTable.Deck = {} cDecks = INIFile.GetValue(sFold..User.."\\decks.ini", "Decks", "Count"); ldTable.dCount = cDecks; for d=1, cDecks, 1 do dName = INIFile.GetValue(sFold..User.."\\decks.ini", "Decks", "Deck"..d); ldTable.Deck[d] = dName; line 79-> ldTable.Deck[d].Card = {} dcCount = INIFile.GetValue(sFold..User.."\\decks.ini", dName, dName.." Count"); ldTable.Deck[d].Count = dcCount; for c=1, dcCount, 1 do cData = INIFile.GetValue(sFold..User.."\\decks.ini", dName, "Card"..c); ldTable.Deck[d].Card[c] = cData; end end return ldTable end
and heres my error message:Code:if deck.Deck[1].Card[1] ~= nil then Dialog.Message("Notice", deck.Deck[1].Card[1], MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); else Dialog.Message("Notice", "error", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); end
i hope thats enough information for you guys. as usual any help would be immensly appreciated.Code:on Preload, Line 79: attempt to index field '?' (a sting value)

Reply With Quote