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

What's wrong?


Akselj
 Share

Recommended Posts

I was trying to compile my soure and got this error:

![](http://akselscape.com/images/error.jpg)

on this:

```
[b]Call EditShopItem[/b](lstItems.ListIndex, cmbItemList.ListIndex + 1, txtItemName.Text, Val(txtPrice.Text), cmbCurrency.ListIndex + 1, Val(txtNumber.Text))
```
I appreciate any help.

Thanks,
AkselJ
Link to comment
Share on other sites

```
' Edits the shop item in the list and array
Public Sub EditShopItem(ByVal Index As Integer, ByVal itemN As Integer, ByVal prc As Integer, ByVal cItem As Integer, ByVal AMT As Integer)
    Dim itemStr As String

    If itemN > 0 And itemN <= MAX_ITEMS Then
        If Index >= 0 And Index <= MAX_SHOP_ITEMS Then

            ' Delete the existing item
            Call lstItems.RemoveItem(Index)

            If Item(itemN).Stackable = 1 Then
                ' It's stackable so add the amount
                itemStr = AMT & " "
            End If

            ' Add the rest
            itemStr = itemStr & Trim$(Item(itemN).Name) & " for " & prc & " " & Trim$(Item(cItem).Name)

            lstItems.addItem itemStr, Index

            ' Add to temp array
            ShopItemList(Index + 1).Amount = AMT
            ShopItemList(Index + 1).ItemNum = itemN
            ShopItemList(Index + 1).Price = prc
        End If
    End If
End Sub

```
Link to comment
Share on other sites

**Call EditShopItem**(lstItems.ListIndex, cmbItemList.ListIndex + 1, txtItemName.Text, Val(txtPrice.Text), cmbCurrency.ListIndex + 1, Val(txtNumber.Text))

Public Sub EditShopItem(ByVal Index As Integer, ByVal itemN As Integer, ByVal prc As Integer, ByVal cItem As Integer, ByVal AMT As Integer)

index, itemnum, prc? citem? amt? (5 things),
your call enters 6 things
Link to comment
Share on other sites

Weird… I'll look into the cleean source and see what I find.

EDIT: Yeah you were right.. I was trying to do something, but found another fix for it... The real command is this:

Call EditShopItem(lstItems.ListIndex, cmbItemList.ListIndex + 1, Val(txtPrice.Text), cmbCurrency.ListIndex + 1, Val(txtNumber.Text))

Thanks!

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