Jump to content
  • 0

how to fix unexpected type for argumen 1. expected number


Question

Posted

here is the error see the image also here's the loop code 

 

        for( set .@i,1; .@i <= 6; set .@i,.@i+1 )
        {
            if ((.@i == 3) && (getiteminfo(getequipid(3),5) == 32) && (getequipisequiped(.@i))) { // Only catch shields
                set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
                set .@arr[.@j], .@i;
                set .@j, .@j + 1;
                set .@menu$, .@menu$ + ":";
            }
            if(getequipisequiped(.@i) && (.@i != 4) && (.@i != 3)) {
                set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
                set .@arr[.@j], .@i;
                set .@j, .@j + 1;
                set .@menu$, .@menu$ + ":";
            }

            
        }

Untitled.jpg

3 answers to this question

Recommended Posts

  • 0
Posted

Try to post the whole script and someone might help you out and test the script. because if you just post something like that? for someone like me that want to help but i cant because my knowledge is very limited on scripting. so please attach the script that you are using.

  • 0
Posted

Try to add this

  for( set .@i,1; .@i <= 6; set .@i,.@i+1 )
        {
+            if( !getequipisequiped(.@i) ) continue;
            if ((.@i == 3) && (getiteminfo(getequipid(3),5) == 32) && (getequipisequiped(.@i))) { // Only catch shields
                set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
                set .@arr[.@j], .@i;
                set .@j, .@j + 1;
                set .@menu$, .@menu$ + ":";
            }
            if(getequipisequiped(.@i) && (.@i != 4) && (.@i != 3)) {
                set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
                set .@arr[.@j], .@i;
                set .@j, .@j + 1;
                set .@menu$, .@menu$ + ":";
            }

            
        }

 

The warning appears because getiteminfo is triggered even when there's nothing equipped.

 

7 hours ago, Winter1992 said:

no one answer as usual lol !! nice rathena keep it up 

If you wanted your question to be answered ASAP. You can hire your own developer :P:P

  • Upvote 1
  • 0
Posted
On 4/1/2017 at 5:37 PM, Radian said:

Try to post the whole script and someone might help you out and test the script. because if you just post something like that? for someone like me that want to help but i cant because my knowledge is very limited on scripting. so please attach the script that you are using.

ok ok bro thanks

 

 

On 4/1/2017 at 7:20 PM, Technoken said:

Try to add this


  for( set .@i,1; .@i <= 6; set .@i,.@i+1 )
        {
+            if( !getequipisequiped(.@i) ) continue;
            if ((.@i == 3) && (getiteminfo(getequipid(3),5) == 32) && (getequipisequiped(.@i))) { // Only catch shields
                set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
                set .@arr[.@j], .@i;
                set .@j, .@j + 1;
                set .@menu$, .@menu$ + ":";
            }
            if(getequipisequiped(.@i) && (.@i != 4) && (.@i != 3)) {
                set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
                set .@arr[.@j], .@i;
                set .@j, .@j + 1;
                set .@menu$, .@menu$ + ":";
            }

            
        }

 

The warning appears because getiteminfo is triggered even when there's nothing equipped.

 

If you wanted your question to be answered ASAP. You can hire your own developer :P:P

ty for this i will try it 

 

On 4/1/2017 at 7:20 PM, Technoken said:

Try to add this


  for( set .@i,1; .@i <= 6; set .@i,.@i+1 )
        {
+            if( !getequipisequiped(.@i) ) continue;
            if ((.@i == 3) && (getiteminfo(getequipid(3),5) == 32) && (getequipisequiped(.@i))) { // Only catch shields
                set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
                set .@arr[.@j], .@i;
                set .@j, .@j + 1;
                set .@menu$, .@menu$ + ":";
            }
            if(getequipisequiped(.@i) && (.@i != 4) && (.@i != 3)) {
                set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
                set .@arr[.@j], .@i;
                set .@j, .@j + 1;
                set .@menu$, .@menu$ + ":";
            }

            
        }

 

The warning appears because getiteminfo is triggered even when there's nothing equipped.

 

If you wanted your question to be answered ASAP. You can hire your own developer :P:P

 

On 4/1/2017 at 7:20 PM, Technoken said:

Try to add this


  for( set .@i,1; .@i <= 6; set .@i,.@i+1 )
        {
+            if( !getequipisequiped(.@i) ) continue;
            if ((.@i == 3) && (getiteminfo(getequipid(3),5) == 32) && (getequipisequiped(.@i))) { // Only catch shields
                set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
                set .@arr[.@j], .@i;
                set .@j, .@j + 1;
                set .@menu$, .@menu$ + ":";
            }
            if(getequipisequiped(.@i) && (.@i != 4) && (.@i != 3)) {
                set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
                set .@arr[.@j], .@i;
                set .@j, .@j + 1;
                set .@menu$, .@menu$ + ":";
            }

            
        }

 

The warning appears because getiteminfo is triggered even when there's nothing equipped.

 

If you wanted your question to be answered ASAP. You can hire your own developer :P:P

thankyou for this my apology for my quote ehe thankyou 

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...