Jump to content

طلب تعديل مشكلة بكود


Recommended Posts

                for i,v in pairs(tab) do
                    local Positions = { ["A"] = { getElementPosition(localPlayer) }, ["B"] = { unpack(v) } }
                    local distance = getDistanceBetweenPoints3D(unpack(Positions["A"]), unpack(Positions["B"]))
                    var = var + 1
                    local row = guiGridListAddRow(source)
                    guiGridListSetItemText(source, row, 1, var, false, false)
                    guiGridListSetItemText(source, row, 2, i, false, false)
                    guiGridListSetItemText(source, row, 3, distance, false, false)
                    guiGridListSetItemData(source, row, 2, v, false, false)
                end

 

Link to comment
23 minutes ago, #STARK said:

                for i,v in pairs(tab) do
                    local Positions = { ["A"] = { getElementPosition(localPlayer) }, ["B"] = { unpack(v) } }
                    local distance = getDistanceBetweenPoints3D(unpack(Positions["A"]), unpack(Positions["B"]))
                    var = var + 1
                    local row = guiGridListAddRow(source)
                    guiGridListSetItemText(source, row, 1, var, false, false)
                    guiGridListSetItemText(source, row, 2, i, false, false)
                    guiGridListSetItemText(source, row, 3, distance, false, false)
                    guiGridListSetItemData(source, row, 2, v, false, false)
                end

 

ليه مسوي كذا ؟

["B"] = { unpack(v) }

تقدر تسويها كذا وخلاص :

["B"] = v

مايحتاج تطولها وهي قصيرة

Link to comment
2 hours ago, #STARK said:

شكلك مبتفهمش حاجه في الجداول انا هبرمج لك المود

مانا فعلا مليش في الجداول وبحاول اتعلمها 

+ لو شفت اخر 3 مواضيع ليا هتلاقيهم عن الجداول

+ ترا انا استخدم الكود حقك انت , يعني الخطا منك مب مني

Bad argument @ 'getDistanceBetweenPoints3D' [Expected number at argument 2, got table]

                for i,v in pairs(tab) do
                    local Positions = { ["A"] = { getElementPosition(localPlayer) }, ["B"] = v }
                    local distance = getDistanceBetweenPoints3D(unpack(Positions["A"]), unpack(Positions["B"]))
                    var = var + 1
                    local row = guiGridListAddRow(source)
                    guiGridListSetItemText(source, row, 1, var, false, false)
                    guiGridListSetItemText(source, row, 2, i, false, false)
                    guiGridListSetItemText(source, row, 3, distance, false, false)
                    guiGridListSetItemData(source, row, 2, v, false, false)
                end

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...