Jump to content

Lock this


Anubhav

Recommended Posts

Wow. You gave me a perfect example.

Thanks Man for solving my problem:)

Question: How to add a column like [ "text" ] and its text? Using table.insert/

The best thing about table is that you can insert almost everything in it and there are many ways to insert, it can be column, rows etc. You always don't really need to use table.insert but instead you can do it like this as well:

myTable.text2 = "And here comes the second one."  
-- this dot will help in inserting the text. 
  

This inserting method is equivalent to:

  
myTable["text2"] = "And here comes the second one." 

Link to comment
  • Replies 54
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Gang is not a table, its a string.

  
local tab = { } 
local gang = getAccountData(getPlayerAccount(source)),"safr.Group") 
-- use getElementData since getAccountData is server side function 
local text = guiGetText(memo) 
tab[gang] = tostring (text) 

Edited by Guest
Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...