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

[EE 2.7] How to fix Value displaying in shops


Akselj
 Share

Recommended Posts

Ok, I don't know if anyone has noticed, but the displaying of values for an item is broken and I found out how to fix it.

For it to work 100% you'll have to go to frmNewShop.frm and add an new label, under the label that says "Vital mod".
Call it lblAmount.

Open up the code in the same form and find this piece of code:

```
    ElseIf Item(itemN).Type >= ITEM_TYPE_POTIONADDHP And Item(itemN).Type <= ITEM_TYPE_POTIONSUBSP Then
        lblVital.Caption = "Value: " & Item(itemN).Data2

```
Delete it.

Add this code at the end of the same sub:

```
    lblAmount.Caption = "Amount: " & Amount

```
Find this:

```
Private Sub ShowItemInfo(ByVal itemN As Integer)

```
Replace with this:

```
Private Sub ShowItemInfo(ByVal itemN As Integer, ByVal Amount As Integer)

```
Find this:

```
Call ShowItemInfo(Shop(shopNum).ShopItem(pageIndex * 5 + Index + 1).ItemNum)

```
Replace with this:

```
        Call ShowItemInfo(Shop(shopNum).ShopItem(pageIndex * 5 + Index + 1).ItemNum, Shop(shopNum).ShopItem(pageIndex * 5 + Index + 1).Amount)

```
Hope this is useful :)

–AkselJ
Link to comment
Share on other sites

  • 1 month later...
Problem:
```
lblAmount.Caption = "Amount: " & Amount
```Doesn't work. It doesn't like the lblAmount

EDIT: Oh wait, what does labeling mean :huh:
EDIT2: Got it…
EDIT3: Now it wants to blame lblVital  :huh: so do i have to remove```
If Item(itemN).Type = ITEM_TYPE_WEAPON Then
        lblVital.Caption = "Attack: " & Item(itemN).Data2
    ElseIf Item(itemN).Type >= ITEM_TYPE_ARMOR And Item(itemN).Type <= ITEM_TYPE_LEGS Then
        lblVital.Caption = "Defense: " & Item(itemN).Data2
    Else
        lblVital.Caption = vbNullString
    End If
```
EDIT4:GOT IT!!
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...