Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Where is the error?


willunited
 Share

Recommended Posts

i put this:

> ' Prevent hacking
>
> If invNum < 1 Or invNum > MAX_INV Then Exit Sub
>
> If Item(GetPlayerInvItemNum(Index, invNum)).BindType = 1 Or Item(GetPlayerInvItemNum(Index, invNum)).BindType = 2 Then Exit Sub
>
> If GetPlayerInvItemNum(Index, invNum) < 1 Or GetPlayerInvItemNum(Index, invNum) > MAX_ITEMS Then Exit Sub
>
> If Item(GetPlayerInvItemNum(Index, invNum)).Type = ITEM_TYPE_CURRENCY Then
>
> If Amount < 1 Or Amount > GetPlayerInvItemValue(Index, invNum) Then Exit Sub
>
> End If

In HandleMapDropItem.

Im geting Subscript out of range,but idk why.

Where is the error?
Link to comment
Share on other sites

Replace

```

If Item(GetPlayerInvItemNum(Index, invNum)).BindType = 1 Or Item(GetPlayerInvItemNum(Index, invNum)).BindType = 2 Then Exit Sub

```

under

```

If GetPlayerInvItemNum(Index, invNum) < 1 Or GetPlayerInvItemNum(Index, invNum) > MAX_ITEMS Then Exit Sub

```

That will fix it. And please next time use the code function for codes, not the quote function.

![](http://img401.imageshack.us/img401/9445/codefunction.jpg)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...