Mirage Source

Free ORPG making software.
It is currently Thu May 23, 2024 7:19 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Shop Bug?
PostPosted: Sat Dec 13, 2008 1:38 am 
Offline
Regular

Joined: Wed Jan 16, 2008 8:50 pm
Posts: 60
Has anyone else noticed this besides me? With an, almost, blank copy of MS4, when I add a shop and try to go into it, it gives my server RTE9. Here is the shop code it brings me too when I click debug

Code:
Sub SendTrade(ByVal Index As Long, ByVal ShopNum As Long)
Dim Packet As String
Dim i As Long, x As Long, y As Long

    Packet = STrade & SEP_CHAR & ShopNum & SEP_CHAR & Shop(ShopNum).FixesItems
    For i = 1 To MAX_TRADES
        Packet = Packet & SEP_CHAR & Shop(ShopNum).TradeItem(i).GiveItem & SEP_CHAR & Shop(ShopNum).TradeItem(i).GiveValue & SEP_CHAR & Shop(ShopNum).TradeItem(i).GetItem & SEP_CHAR & Shop(ShopNum).TradeItem(i).GetValue
       
        ' Item #
        x = Shop(ShopNum).TradeItem(i).GetItem
       
        If Item(x).Type = ITEM_TYPE_SPELL Then
            ' Spell class requirement
            y = Spell(Item(x).Data1).ClassReq
           
            If y = 0 Then
                Call PlayerMsg(Index, Trim$(Item(x).Name) & " can be used by all classes.", Yellow)
            Else
                Call PlayerMsg(Index, Trim$(Item(x).Name) & " can only be used by a " & GetClassName(y - 1) & ".", Yellow)
            End If
        End If
    Next i
    Packet = Packet & END_CHAR
   
    Call SendDataTo(Index, Packet)
End Sub


and here is the line it highlights

Code:
If Item(x).Type = ITEM_TYPE_SPELL Then


I didn't have any spell items in my shop, nor did I have spells. This RTE went away after I added 2 spell items and 2 spells to my shop, then a new error popped up on

Code:
Function GetClassName(ByVal ClassNum As Long) As String
    GetClassName = Trim$(Class(ClassNum).Name)
End Function


on the

Code:
GetClassName = Trim$(Class(ClassNum).Name)


Any suggestions?

(edit) Forgot to mention the subscript out of range is on the code
Code:
(class(


Top
 Profile  
 
 Post subject: Re: Shop Bug?
PostPosted: Sun Dec 14, 2008 4:04 pm 
Offline
Knowledgeable
User avatar

Joined: Fri Feb 02, 2007 4:50 am
Posts: 263
Location: usa michigan centriville
ok gakien or DFA i need you for a second here..

x = Shop(ShopNum).TradeItem(i).GetItem

is not getting the item number. for some strange reason. so Ive been sitting here trying to figure out why but i can't think of it so i will need your help. so if your not busy i could use ya ^^.

_________________
Fuck? I really joined in 2006.
Spirea, Chat Rooms, Discussions, Help. everything you need in one spot.
http://spirean.com
I love my computer, you never ask for more, you can be my princess or be my whore


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group