Chompy |
05-28-2008 03:53 PM |
Quote:
Originally Posted by Crow
(Post 1392967)
Thanks for the offer Robin, but I have done enough and I might also say too much testing on this already. It just sucks. Think about commands like /itemtrade on Era. It's asking for the account to trade to (or did so in the past). Nobody wants to use Graalxxxxxx accounts for that, but if people don't have a community name I also have to code something that allows people to put both account and community name. That's just ****in complicated.
|
I always use something like this or something :o
PHP Code:
a = pl.communityname; if (a == 0) a = pl.account; else if (a == "guest") a = pl.account;
so..
PHP Code:
function checkPlayer(plyr) { temp.a = findplayer(plyr); if (a == 0) a = findplayerbycommunityname(plyr); if (a == 0) return 0; return 1; }
something like that would do it, but I haven't tested it though..
Quote:
Originally Posted by Robin
(Post 1392972)
1. findplayerbycommunityname(str) returns object
2. What about new accounts?
|
1. You stated that we could just use communityname where we used accounts, not true as I stated that you can't use findplayer() and that has been used since gs2 came out. findplayerbycommunityname() was added some weeks after the communitynames came out because of complaints in the scripting forum..
2. New accounts can choose their own communityname once logged on graalonline.com and then by editing their profile from there if I recall.
I would like findplayer() to work with both :( findplayerbycommunityname() is too long.. and I don't like to make something like
PHP Code:
public function findcommunityplayer(a) { return findplayerbycommunityname(a); }
or something like that.. :(
|