Akselj Posted May 4, 2009 Author Share Posted May 4, 2009 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 More sharing options...
unnown Posted May 4, 2009 Share Posted May 4, 2009 show the EditShopItem sub,you are trying to input more things in the call than it accepts (i think) Link to comment Share on other sites More sharing options...
Akselj Posted May 5, 2009 Author Share Posted May 5, 2009 ```' Edits the shop item in the list and arrayPublic 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 IfEnd Sub``` Link to comment Share on other sites More sharing options...
unnown Posted May 5, 2009 Share Posted May 5, 2009 **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 More sharing options...
Akselj Posted May 5, 2009 Author Share Posted May 5, 2009 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now