| killerogue |
07-17-2007 12:40 AM |
Parteeeeee
PHP Code:
function onCreated() {
createParty({"James", "John", "Ky"});
onTimeout();
}
public function createParty(members) {
temp.keys = getstringkeys("this.party");
temp.pindex = keys.size();
makevar("this.party" @ pindex) = members;
setTimer(.05);
}
public function destroyParty() {
}
public function partyChecks() {
if (getstringkeys("this.party") != null)
return true;
else if (getstringkeys("this.party") == null)
return false;
}
public function playerInParty(acct) {
for (temp.party : getstringkeys("this.party")) {
if (acct in makevar("this.party" @ party)) return {true, acct};
}
return {false, acct};
}
public function addMember() {
}
public function removeMember() {
}
public function updateParties() {
for (temp.party : getstringkeys("this.party")) {
echo(party);
if (this.(@ "party" @ party).size() <= 1) {
echo("party has 1 or less member(s)");
}
else {
echo("party has more than one member(s)");
}
}
}
function onTimeout() {
if (partyChecks() == true) {
updateParties();
setTimer(.05);
}
else
return;
}
Party system I'm working on for a project. Was wondering why this also continuously insists upon echoing "Checks" when I echo party. :o
|