Jump to content
  • 0

Can someone help me?


Yukaiii

Question


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  110
  • Reputation:   9
  • Joined:  11/20/13
  • Last Seen:  

Could someone please help me to fix this script?
I used this script on my old server..
it is giving these errors!
could someone tell me how to fix it?

 

Quote

arena_room,105,93,5    script    3 vs 3 Party    822,{
    if (BaseLevel < 250 || Class==Job_Novice || Class==Job_Baby || Class==Job_Novice_High) {
    mes "[Arena Guide]";
    mes "Desculpe, Você precisa está acima do level 250 ou não ser Apredinz.";
close;
}
if (getpartyleader(getcharid(1),2) != getcharid(0)) {
mes "Apenas o líder da Party pode Registrar!"; 
close;


if (getpartymembercount(getcharid(1)) != 3 && getpartycount(getcharid(1)) != 3){
 mes "Desculpe, Você não atende o requesitos, Verifique se sua Party têm 3 pessoas e tente novamente.";
close;
    }

 
getpartymember getcharid(1),0;
getpartymember getcharid(1),1;
getpartymember getcharid(1),2;
set .@count, $@partymembercount;
if(.@count < 3)
end; //Not enough members
copyarray .@charid[0],$@partymembercid[0],$@partymembercount;
//if($@partymembercount != ) end;
    for(set .@i,0; .@i < .@count; set .@i, .@i + 1){
    if( isloggedin($@partymemberaid[.@i],$@partymembercid[.@i]))
        set .@online, .@online + 1;
    }
    if(.@count != .@online){
mes" Algum membro do grupo não está online!";
        close;
}

 

image.png

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.02
  • Content Count:  911
  • Reputation:   166
  • Joined:  11/27/14
  • Last Seen:  

2 hours ago, Yukaiii said:

Could someone please help me to fix this script?
I used this script on my old server..
it is giving these errors!
could someone tell me how to fix it?

 

 

image.png

It says you have error on line 15 and it is unmatch ")" . 

I already see the problem .

if (getpartymembercount(getcharid(1)) != 3 && getpartycount(getcharid(1)) != 3){

You need to fix your statement .. I don't want to spoon feed you with answer . I want you to learn how to fix this simple thing .. The error already says what the problem . You only need to do is understand the flow of the script 

Edited by Poring King
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  110
  • Reputation:   9
  • Joined:  11/20/13
  • Last Seen:  

20 hours ago, Poring King said:

It says you have error on line 15 and it is unmatch ")" . 

I already see the problem .

if (getpartymembercount(getcharid(1)) != 3 && getpartycount(getcharid(1)) != 3){

You need to fix your statement .. I don't want to spoon feed you with answer . I want you to learn how to fix this simple thing .. The error already says what the problem . You only need to do is understand the flow of the script 

I've tried in every way and the same error continues my friend.
I also don't have a good knowledge with scripting.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  233
  • Reputation:   86
  • Joined:  06/30/18
  • Last Seen:  

Hello,

it is hard to help you, since you didn't provide the complete script. But I can give you a tip. getpartymembercount and getpartycount aren't functions.

Later you get the number of people in the party here:
 

set .@count, $@partymembercount;

So you basically could move:
 

if (getpartymembercount(getcharid(1)) != 3 && getpartycount(getcharid(1)) != 3){
	mes "Desculpe, Você não atende o requesitos, Verifique se sua Party têm 3 pessoas e tente novamente.";
	close;
}

Below above said line and change it to:
 

if (.@count != 3){
	mes "Desculpe, Você não atende o requesitos, Verifique se sua Party têm 3 pessoas e tente novamente.";
	close;
}

To achieve what it seems you want it to do.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1188
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

6 hours ago, Winterfox said:

Hello,

it is hard to help you, since you didn't provide the complete script. But I can give you a tip. getpartymembercount and getpartycount aren't functions.

Later you get the number of people in the party here:
 

set .@count, $@partymembercount;

So you basically could move:
 

if (getpartymembercount(getcharid(1)) != 3 && getpartycount(getcharid(1)) != 3){
	mes "Desculpe, Você não atende o requesitos, Verifique se sua Party têm 3 pessoas e tente novamente.";
	close;
}

Below above said line and change it to:
 

if (.@count != 3){
	mes "Desculpe, Você não atende o requesitos, Verifique se sua Party têm 3 pessoas e tente novamente.";
	close;
}

To achieve what it seems you want it to do.

try change this line

if (getpartymembercount(getcharid(1)) != 3 && getpartycount(getcharid(1)) != 3){

into like this

if ((getpartymembercount(getcharid(1)) != 3) && (getpartycount(getcharid(1)) != 3)){
Link to comment
Share on other sites

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.

×
×
  • Create New...