Help Getting and Setting Propertys in Accounts

Here you can post threads requesting help on the official POL Ultima Online Emulator Core 097.
Note: Core 097 is no longer officially supported.

Moderator: POL Developer

Post Reply
Shirkit
New User
Posts: 9
Joined: Tue Apr 29, 2008 2:01 pm

Help Getting and Setting Propertys in Accounts

Post by Shirkit »

Hello.

I'm trying to create New Propertys and Get some of them, but I don't know why I'm not able to do such thing.

Code: Select all

use uo;
use os;

program dildo(cmd)

var eita,name;
	cmd := cmd;
	eita := FindAccount("admin");
	name := eita.GetProp("Name");
	eita.SetProp("Coisa", 1);
	print("Name: "+ eita.GetProp("Name"));
	print("Coisa: "+ eita.GetProp("Coisa"));
	return 1;

endprogram
Why I'm not able to get the Account Name? It Returns "Property Not Found". Can someone help me?
User avatar
CWO
POL Expert
Posts: 1159
Joined: Sat Feb 04, 2006 5:49 pm

Re: Help Getting and Setting Propertys in Accounts

Post by CWO »

Code: Select all

use uo;
use os;

program dildo(cmd)

var eita,name;
   cmd := cmd;
   eita := FindAccount("admin");
   name := eita.name;
   print("Name: "+ name);
   return 1;
endprogram
The account name is a member of the account object, not a prop. So unless you set this prop to all of your accounts in your scripts yourself, you're much better off just using the account.name instead of account.getprop().
Shirkit
New User
Posts: 9
Joined: Tue Apr 29, 2008 2:01 pm

Re: Help Getting and Setting Propertys in Accounts

Post by Shirkit »

Yeah, you're absolutly right =D And it worked on my other codes, thanks! ^^
Post Reply