#Hulk Posted April 9, 2018 Share Posted April 9, 2018 السلام عليكم مشكله بسيطه , الصاق التاب باللوحه , الخطا السطر 4 Bad argument #1 to 'pairs' (table expected, got number) شكراا مقدما .. local factionTable = getElementData(getLocalPlayer(), "faction") local organizedTable = {} for i, k in pairs(factionTable) do organizedTable[k] = i end --#Hulk for k, id in ipairs(organizedTable) do if id ~= factionID then ftab[id] = guiCreateTab(getFactionName(id), ftabs) setElementData(ftab[id], "factionID", id) addEventHandler("onClientGUITabSwitched", ftab[id], loadFaction, false) end end Link to comment
Master_MTA Posted April 9, 2018 Share Posted April 9, 2018 7 minutes ago, #Hulk said: Bad argument #1 to 'pairs' (table expected, got number) factionTable اتحقق من القيمه ذي يقول انها رقم Link to comment
#Hulk Posted April 9, 2018 Author Share Posted April 9, 2018 2 minutes ago, Master_MTA said: factionTable اتحقق من القيمه ذي يقول انها رقم اظن انها متعرفه فوق ؟.. Link to comment
Master_MTA Posted April 9, 2018 Share Posted April 9, 2018 11 minutes ago, #Hulk said: اظن انها متعرفه فوق ؟.. وريني تعريفها Link to comment
#Hulk Posted April 9, 2018 Author Share Posted April 9, 2018 23 minutes ago, #Hulk said: السلام عليكم مشكله بسيطه , الصاق التاب باللوحه , الخطا السطر 4 Bad argument #1 to 'pairs' (table expected, got number) شكراا مقدما .. local factionTable = getElementData(getLocalPlayer(), "faction") local organizedTable = {} for i, k in pairs(factionTable) do organizedTable[k] = i end --#Hulk for k, id in ipairs(organizedTable) do if id ~= factionID then ftab[id] = guiCreateTab(getFactionName(id), ftabs) setElementData(ftab[id], "factionID", id) addEventHandler("onClientGUITabSwitched", ftab[id], loadFaction, false) end end 2 minutes ago, Master_MTA said: وريني تعريفها ايه المشكله ف اللوب بتاع FactionTable ? Link to comment
Master_MTA Posted April 9, 2018 Share Posted April 9, 2018 1 minute ago, #Hulk said: ايه المشكله ف اللوب بتاع FactionTable ? Bad argument #1 to 'pairs' (table expected, got number) بيقول التيبل المتوقع رجع برقم مش بتيبل Link to comment
#Hulk Posted April 9, 2018 Author Share Posted April 9, 2018 7 minutes ago, Master_MTA said: Bad argument #1 to 'pairs' (table expected, got number) بيقول التيبل المتوقع رجع برقم مش بتيبل طيب اللوب الي تحت شغال تمام , ! حل ؟ Link to comment
Master_MTA Posted April 9, 2018 Share Posted April 9, 2018 1 minute ago, #Hulk said: طيب اللوب الي تحت شغال تمام , ! حل ؟ يعتمد على المتغيرات اذا كانت صحيحه او لا 1 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now