Jump to content

First time attempt - Convert Global to readable string


Rizalgar

Recommended Posts

So, I'm trying to get a global to return a string value based off its value. If that's even possible. I can't figure it out. This one truly is beyond me. If one of you could take a look at the bit in question and let me know what's up, Id greatly appreciate it.

Function GetClasss()
	String Classs2 = DNS_GV_cClass.GetValue()
	string Classs1 = ""
	
	If Classs2 == 0
		Classs1 = "None"
	ElseIf Classs2 == 1
		Classs1 = "Fighter"
	ElseIf Classs2 == 2
		Classs1 = "Ranger"
	ElseIf Classs2 == 3
		Classs1 = "Wizard"
	EndIf
	Classs = Classs1 + "" + Classs1 + ""
EndFunction 

-Edit- Forgot to mention, this is for a SkyUI update.

 

-Edit2- Went to the forums too quickly, again. Proper way to do it, cuz I'm an idiot

Function GetSubclass()
	Float Subclass1 = DNS_GV_cSubclass.GetValue()
	String Subclass2
	If Subclass1 == 0 
		stringSubclass = "Death Knight"
	EndIf	
EndFunction 
Edited by Rizalgar
Link to comment
Share on other sites

  • Recently Browsing   0 members

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