Page 1 of 1
					
				Showing the SkillValue with UoSay
				Posted: 26.12.2009 18:52
				by canabisman
				Hello friends im back!
So, im having a little problem  how can i show the value from an specific skill, i was trying like this:
Code: Select all
program showskill;
{$Include 'all.inc'} 
var
tempskill : integer;
Begin 
 UoSay('Show Magery Skill Test');
 tempskill := GetSkillValue('Magery');
 UoSay('Magery: '+IntToStr(tempskill');
end.
But it doesnt work, could someone show the correct way, thank you.. :DD
 
			
					
				
				Posted: 26.12.2009 18:53
				by canabisman
				Im getting this error:
 Compiling
 Compiler: [Error] (Show Skill Value Test.sc at 11:38):  Type mismatch
 Compiling failed
 Script Show Skill Value Test.sc stopped successfuly
			 
			
					
				
				Posted: 26.12.2009 20:01
				by Vizit0r
				Code: Select all
function GetSkillValue(SkillName: String): Double;
Double - float type, but integer - not
Code: Select all
tempskill := Round(GetSkillValue('Magery'));
or
Code: Select all
tempskill : double; 
Begin 
 UoSay('Show Magery Skill Test'); 
 tempskill := GetSkillValue('Magery'); 
 UoSay('Magery: '+FloatToStr(tempskill');
you may need functions like RoundTo or something like this
 
			
					
				
				Posted: 28.12.2009 1:53
				by canabisman
				It worked successfully thanks..
the only problem is that it shows like this
Magery: 50.0000000000
not 
Magery: 50.0
it shows a lot of 0
 but thats ok
			 
			
					
				
				Posted: 28.12.2009 9:38
				by WladL
				Code: Select all
function FloatToStrF(Value: Extended; Format: TFloatFormat; Precision, Digits: Integer): string; 
 
			
					
				Re: Showing the SkillValue with UoSay
				Posted: 14.06.2012 9:57
				by canabisman
				thanks!
			 
			
					
				Re: Showing the SkillValue with UoSay
				Posted: 24.12.2012 21:25
				by elemeNt X
				You forget one ) in the last line 
 
UoSay('Magery: '+IntToStr(tempskill'));