View Single Post
05/12/14, 10:56 AM   #1
deathangel1479
 
deathangel1479's Avatar
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 6
Need help with simple function, it wont work.

Because Controls cant removed, i want to reuse them and if need more add them.

This is my function, it dont work, what ever I try.

Code:
function RMM.CreateControl(iY,iX)
	if not RMM.c.map:GetNamedChild("RMM_MAPS_"..iX..iY) then
		RMM.maps[iY][iX] = WINDOW_MANAGER:CreateControl("RMM_MAPS_"..iX..iY, RMM.c.map, CT_TEXTURE)
	end
end
if not RMM.c.map:GetNamedChild("RMM_MAPS_"..iX..iY) <--- everytime true

RMM.c.map is a CT_CONTROLk, wrong type?

I have also tryed:
if not RMM.maps[iY][iX] then <--- everytime false

And a lot other with: ==nil, ~=nil then return ........

Last edited by deathangel1479 : 05/12/14 at 11:46 AM.
  Reply With Quote