breuning
|
  |
| Joined: 30 Oct 2008 |
| Total Posts: 4268 |
|
|
| 10 Jan 2014 10:09 AM |
loadstring("return _G.DataBase['Weapons']['M1891/30']")()
returns nil this table is existent and the index names are right help
function:
function _GETITEM(...) local tabofentr = {...} local str = "return _G.DataBase" for _,v in next, tabofentr do if _ > 1 then print(v) str = str.."['"..v.."']" end end if str ~= "return _G.DataBase" then print("loadstring") -- prints print(str) -- this is right return loadstring(str)() else print("nil") return nil end end |
|
|
| Report Abuse |
|
|
YEGGOR
|
  |
| Joined: 02 Apr 2013 |
| Total Posts: 1150 |
|
|
| 10 Jan 2014 10:18 AM |
| sorry man i gtg to school now |
|
|
| Report Abuse |
|
|
breuning
|
  |
| Joined: 30 Oct 2008 |
| Total Posts: 4268 |
|
|
| 10 Jan 2014 10:19 AM |
rly got time to criticize me but not to hlp me
not cool man not cool |
|
|
| Report Abuse |
|
|
breuning
|
  |
| Joined: 30 Oct 2008 |
| Total Posts: 4268 |
|
|
| 10 Jan 2014 10:26 AM |
| i hate it when my own scripting level surpasses scripting helper's forum level but is lower than scripter's forum level |
|
|
| Report Abuse |
|
|
breuning
|
  |
| Joined: 30 Oct 2008 |
| Total Posts: 4268 |
|
|
| 10 Jan 2014 10:46 AM |
got it:
i had this as OnServerInvoke:
function script._GETDBITEM.OnServerInvoke(...) if not _GETITEM(...) == nil then return _GETITEM(...) else return _ERROR(1) end end
and now I did
function script._GETDBITEM.OnServerInvoke(...) if _GETITEM(...) then return _GETITEM(...) else return _ERROR(1) end end
works fine |
|
|
| Report Abuse |
|
|