API:GetClassID

id=GetClassInfoByID(x)
== Arguments ==
:;x - 
:: Number of class to check
== Returns ==
:: If the class exists, it returns x, else it returns nil
== Example ==
for a=1, GetNumClasses() do --GetClassCount() would automaticly return the number of existing classes, so for this demonstration I choose GetNumClasses()...
	if(GetClassInfoByID(a)~=nil)then
		DEFAULT_CHAT_FRAME:AddMessage("there is a class nr."..a.." -- ("..GetClassInfoByID(a)..")");
	else
		DEFAULT_CHAT_FRAME:AddMessage("no class nr."..a.." found!");
	end
end
prints the numbers of all existing classes
== Related Functions ==
* GetClassInfoByID
Category:Functions