Jump to content

Search the Community

Showing results for tags 'lua table'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 1 result

  1. Hi. I have some issue and can't really deal with it. I have a table: declaration, initialization... local taxidf = { { } }; taxidf[player] = { player = getPlayerName(player), ped = {}, blip = {}, mark = {}, endblip = {}, endmark = {} }; Then to this table I put some values (one of them is below): local ped = createPed( tonumber( id ), DTM_PTS[startPoint][2], DTM_PTS[startPoint][3], DTM_PTS[startPoint][4] + 0.5 ) table.insert( taxidf[player].ped, { ped } ) No matter what's in these DMTs - I need to sketch the problem... Ped is created indeed. And when I want to receive the data later: I get local ped = taxidf[player].ped; I got a message the table length is 1 but table is nil. So I have a question: how should I take the object from this table? What am I doing wrong? To visualize the output I : outputDebugString("ped : "..tostring(ped)..", len: "..tostring(#ped)..", "..tostring(ped[0])..", "..tostring(ped[1]) ); results: `ped: table : 0af4gf3t len : 0, nil, nil` So ped[0] is null, ped is a table.... what to deal with it?? I just want to have back the object in the exact way I do this. Please some suggestions. My target is to: setTimer( killPed, 60, 1, ped ) --- error: [expected element at arg.1, got table] or setTimer( killPed, 60, 1, ped[1] ) --- error: [expected element at arg.1, got nil] you understand... I can't kill this ped!
×
×
  • Create New...