27-01-2009, 04:47 AM
Alright, I DONT FUCKING GET IT
Subscript out of range
I've never had problems with it, until I added
To the client.
I have this in the server:
And this in the client:
Everything seemed to work/compile correctly UNTIL I tried to get the quantity in stock show up in the shop, for each item.
Subscript out of range
Code:
Stocked = CLng(Parse(n + 4))
I've never had problems with it, until I added
Code:
Stocked = CLng(Parse(n + 4))
Increase = CLng(Parse(n + 5))
Decrease = CLng(Parse(n + 6))
To the client.
I have this in the server:
Code:
For i = 1 To MAX_TRADES
Shop(ShopNum).TradeItem(i).GiveItem = CLng(Parse(N))
Shop(ShopNum).TradeItem(i).GiveValue = CLng(Parse(N + 1))
Shop(ShopNum).TradeItem(i).GetItem = CLng(Parse(N + 2))
Shop(ShopNum).TradeItem(i).GetValue = CLng(Parse(N + 3))
Shop(ShopNum).TradeItem(i).Stocked = CLng(Parse(N + 4))
Shop(ShopNum).TradeItem(i).DemandIncrease = CLng(Parse(N + 5))
Shop(ShopNum).TradeItem(i).DemandDecrease = CLng(Parse(N + 6))
N = N + 7
Next
And this in the client:
Code:
For i = 1 To MAX_TRADES
GiveItem = CLng(Parse(n))
GiveValue = CLng(Parse(n + 1))
GetItem = CLng(Parse(n + 2))
GetValue = CLng(Parse(n + 3))
Stocked = CLng(Parse(n + 4))
Increase = CLng(Parse(n + 5))
Decrease = CLng(Parse(n + 6))
If GiveItem > 0 Then
If GetItem > 0 Then
frmTrade.lstTrade.AddItem "Give " & Trim$(Shop(ShopNum).Name) & " " & GiveValue & " " & Trim$(Item(GiveItem).Name) & " for " & Trim$(Item(GetItem).Name & "(" & Stocked & ")")
End If
End If
n = n + 7
Everything seemed to work/compile correctly UNTIL I tried to get the quantity in stock show up in the shop, for each item.