Page 1 of 1

Level

Posted: Sun Aug 10, 2008 4:15 pm
by runtest
I have this in checklevel.inc.

Code: Select all

use uo;

function CheckExp(who)
	var player_exp := GetObjProperty(who, "Exp");
	
	case( player_exp )
		500:
			SetObjProperty(who, "Level", 1);
			SendSysMessage(who, "You have increased in experience.", color := 65 );
			break;
		1500:
			SetObjProperty(who, "Level", 2);
			SendSysMessage(who, "You have increased in experience.", color := 65 );
			break;
		4500:
			SetObjProperty(who, "Level", 3);
			SendSysMessage(who, "You have increased in experience.", color := 65 );
			break;
		default:
			break;
	endcase
endfunction
It does not seem to work though. Is there something here I am missing?

Posted: Sun Aug 10, 2008 4:51 pm
by Austin
Glancing quickly..


If you're testing the value using the text command to set it, it is probably being set as a string. Try CInt() around where you get the custom property.