Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Genusis's questions/help page.
#3
Thanks for your help on that I could not decide what was what and which one was the right way of doing it since the tut did not specify what to do with that exactly. well my other problem is how would I do it with something that uses x, and y perimeters.

Code:
Sub LoadShops()
On Error Resume Next

Dim FileName As String
Dim x As Long, y As Long

    Call CheckShops
    
    FileName = App.Path & "\data\shops.ini"
    
    For y = 1 To MAX_SHOPS
        Shop(y).name = GetVar(FileName, "SHOP" & y, "Name")
        Shop(y).JoinSay = GetVar(FileName, "SHOP" & y, "JoinSay")
        Shop(y).LeaveSay = GetVar(FileName, "SHOP" & y, "LeaveSay")
        Shop(y).FixesItems = GetVar(FileName, "SHOP" & y, "FixesItems")
        
        For x = 1 To MAX_TRADES
            Shop(y).TradeItem(x).GiveItem = GetVar(FileName, "SHOP" & y, "GiveItem" & x)
            Shop(y).TradeItem(x).GiveValue = GetVar(FileName, "SHOP" & y, "GiveValue" & x)
            Shop(y).TradeItem(x).GetItem = GetVar(FileName, "SHOP" & y, "GetItem" & x)
            Shop(y).TradeItem(x).GetValue = GetVar(FileName, "SHOP" & y, "GetValue" & x)
        Next x
    
        DoEvents
    Next y
End Sub

Like the one above. Thanks for your help William. since I know you will probably be the one helping with this one to.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)