Jump to content

x[مساعدة]x في الكونفيرت نمبر


Recommended Posts

--Client

for i,k in ipairs (Place) do
l = guiGridListAddRow (placelist)
guiGridListSetItemText (placelist,l,1,tostring(k[1]),false,false)
guiGridListSetItemText (placelist,l,2,"$"..convertNumber..tostring(k[5]),false,false)
guiGridListSetItemData(placelist,l,1,{k[2],k[3],k[4],k[5]})
guiGridListSetItemColor(placelist,l,1,0,150,255)
guiGridListSetItemColor(placelist,l,2,0,255,0)
guiSetFont(placelist,"f1.ttf")
end

function convertNumber ( number )  
	local formatted = number  
	while true do      
		formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2')    
		if ( k==0 ) then      
			break   
		end  
	end  
	return formatted
end

 

Link to comment
for i,k in ipairs (Place) do
	local l = guiGridListAddRow (placelist)
	guiGridListSetItemText (placelist,l,1,tostring(k[1]),false,false)
	guiGridListSetItemText (placelist,l,2,"$"..convertNumber(tonumber(k[5])),false,false)
	guiGridListSetItemData(placelist,l,1,{k[2],k[3],k[4],k[5]})
	guiGridListSetItemColor(placelist,l,1,0,150,255)
	guiGridListSetItemColor(placelist,l,2,0,255,0)
end

guiSetFont(placelist,"f1.ttf") -- هذا تحطه تحت كود إنشاء القريد ليست

function convertNumber ( number )  
	local formatted = number  
	while true do      
		formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2')    
		if ( k == 0 ) then      
			break   
		end  
	end  
	return formatted
end

 

Edited by !#NssoR_)
Link to comment
Just now, !#NssoR_) said:

for i,k in ipairs (Place) do
	local l = guiGridListAddRow (placelist)
	guiGridListSetItemText (placelist,l,1,tostring(k[1]),false,false)
	guiGridListSetItemText (placelist,l,2,"$"..convertNumber(tostring(k[5])),false,false)
	guiGridListSetItemData(placelist,l,1,{k[2],k[3],k[4],k[5]})
	guiGridListSetItemColor(placelist,l,1,0,150,255)
	guiGridListSetItemColor(placelist,l,2,0,255,0)
end

guiSetFont(placelist,"f1.ttf") -- هذا تحطه تحت كود إنشاء القريد ليست

function convertNumber ( number )  
	local formatted = number  
	while true do      
		formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2')    
		if ( k == 0 ) then      
			break   
		end  
	end  
	return formatted
end

 

موب شغال المشكلة
ERROR: Warp-System\c.lua:4: attempt to call global 'convertNumber' (a nil value)

Link to comment
function convertNumber ( number )  
	local formatted = number  
	while true do      
		formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2')    
		if ( k == 0 ) then      
			break   
		end  
	end  
	return formatted
end
for i,k in ipairs (Place) do
	local l = guiGridListAddRow (placelist)
	guiGridListSetItemText (placelist,l,1,tostring(k[1]),false,false)
	guiGridListSetItemText (placelist,l,2,"$"..convertNumber(tostring(k[5])),false,false)
	guiGridListSetItemData(placelist,l,1,{k[2],k[3],k[4],k[5]})
	guiGridListSetItemColor(placelist,l,1,0,150,255)
	guiGridListSetItemColor(placelist,l,2,0,255,0)
end

guiSetFont(placelist,"f1.ttf")

 

Link to comment
Just now, Abdul KariM said:

function convertNumber ( number )  
	local formatted = number  
	while true do      
		formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2')    
		if ( k == 0 ) then      
			break   
		end  
	end  
	return formatted
end
for i,k in ipairs (Place) do
	local l = guiGridListAddRow (placelist)
	guiGridListSetItemText (placelist,l,1,tostring(k[1]),false,false)
	guiGridListSetItemText (placelist,l,2,"$"..convertNumber(tostring(k[5])),false,false)
	guiGridListSetItemData(placelist,l,1,{k[2],k[3],k[4],k[5]})
	guiGridListSetItemColor(placelist,l,1,0,150,255)
	guiGridListSetItemColor(placelist,l,2,0,255,0)
end

guiSetFont(placelist,"f1.ttf")

 

شكرا عبد الكريم اشتغلت :] 

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...