Jump to content

Question

1 answer to this question

Recommended Posts

Posted

First of, the variables are a bit messed up.

1) You can't use the same variable for both iterating and holding the array data like this.

Use the variables actually set by *getpartymember()

2) You use $@members as a static var? The party could have everything from 1 to 12 members.

*getpartymember sets $@partymembercount, use that.

You use *getpartymember(... , 1) but you don't use the cid in *isloggedin(aid, cid). So technically the player can have 2 characters from the same account and be offline on one of them and still register as online.

You can rewrite the for loop to reduce the code:

for(set .@i, 0; .@i < $@partymembercount && isloggedin($@partymemberaid[.@i], $@partymembercid[.@i]); set .@i, .@i+1){ }
if(.@i < $@partymembercount){
 mes "not enough members";
 close;
}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...