Jump to content
  • 0

Unexpected type for argument 2. Expected number.


jayson14

Question


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   0
  • Joined:  03/06/16
  • Last Seen:  

Hello I understand this warning that i should put number instead of variable. but how can i maintain this 2nd argument with variable like this 

getitem .donate_item, @Donation_Code$;

 

The warning resolves by replacing @Donation_Code$; with number like this below

getitem .donate_item, 1;

 

I Just want to remove the warning and use the first line of code above

Unexpected type for argument 2. Expected number.

 

Can someone help me?

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  255
  • Reputation:   232
  • Joined:  07/24/13
  • Last Seen:  

1 hour ago, jayson14 said:

Hello I understand this warning that i should put number instead of variable. but how can i maintain this 2nd argument with variable like this 


getitem .donate_item, @Donation_Code$;

 

The warning resolves by replacing @Donation_Code$; with number like this below


getitem .donate_item, 1;

 

I Just want to remove the warning and use the first line of code above

Unexpected type for argument 2. Expected number.

 

Can someone help me?

Read this to understand how variables works and what variable should use here:
https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L455
...$ - is a string variables
you should use here .@...

getitem .donate_item, .@Donation_Code;

 

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