Mirage Source

Free ORPG making software.
It is currently Thu Mar 28, 2024 8:05 am

All times are UTC




Post new topic Reply to topic  [ 1738 posts ]  Go to page 1, 2, 3, 4, 5 ... 70  Next
Author Message
 Post subject: Visual Spells - Error
PostPosted: Sun Jul 05, 2009 1:09 pm 
Offline
Newbie

Joined: Sat Mar 21, 2009 11:27 am
Posts: 9
Hey there,
Well basically, while making Visual Inventory (which now works) and Visual Spells (with icons) I encountered an error. The spells icon won't save so I always end up with the blank one...

What I did was remove the frame from the spell editor. I called the icon's variable "Frame" as it is easier to remember since scrlFrame already existed. Spell casting works, learning spells works but not getting the proper icons. So, if anyone could list up all the places I need to add stuff to make a new variable in spells so I can see if I am misssing some, please do so.

Thanks,
AkselJ


Top
 Profile  
 
PostPosted: Sun Jul 05, 2009 3:48 pm 
Offline
Persistant Poster

Joined: Fri Jun 26, 2009 10:15 pm
Posts: 701
Google Talk: FAProductions
Follow your save and edit spell packets.


Top
 Profile  
 
PostPosted: Sun Jul 05, 2009 7:33 pm 
Offline
Newbie

Joined: Sat Mar 21, 2009 11:27 am
Posts: 9
I tried that, but I couldn't find anything there...


Top
 Profile  
 
PostPosted: Sun Jul 05, 2009 9:18 pm 
Offline
Persistant Poster

Joined: Fri Jun 26, 2009 10:15 pm
Posts: 701
Google Talk: FAProductions
Is this the byte array packets version or the original method?

Either way, you have to send in the exact same order and when it comes to the byte array method, if you write a long, you have to read a long.


Top
 Profile  
 
PostPosted: Sun Jul 05, 2009 11:13 pm 
Offline
Newbie

Joined: Sat Mar 21, 2009 11:27 am
Posts: 9
I tried following the packets again, and noticed somplace i forgot to add the new variable. Now, though, the pictures won't load in the spells list, it only returns the spell as 0 loading the empty spell frame... Any ideas?


Top
 Profile  
 
PostPosted: Mon Jul 06, 2009 1:05 am 
Offline
Persistant Poster

Joined: Fri Jun 26, 2009 10:15 pm
Posts: 701
Google Talk: FAProductions
Possibly not setting the scrlframe value to whatever the value you saved to the item, properly.


Top
 Profile  
 
PostPosted: Mon Jul 06, 2009 12:04 pm 
Offline
Newbie

Joined: Sat Mar 21, 2009 11:27 am
Posts: 9
Matt wrote:
Possibly not setting the scrlframe value to whatever the value you saved to the item, properly.


Whenever I save an spell, I can open it fine and it displays the correct picture.

Code:
' :::::::::::::::::::
' :: Spells packet ::
' :::::::::::::::::::
Private Sub HandleSpells(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
Dim i As Long
Dim j As Long
Dim n As Long
Dim k As Long
Dim Buffer As clsBuffer

    Set Buffer = New clsBuffer
     
    Buffer.WriteBytes Data()
   
    With frmSpells
        .Visible = True
               
        For i = 1 To MAX_PLAYER_SPELLS
           k = Buffer.ReadLong
           PlayerSpells(k) = Buffer.ReadLong
        Next
       
        ' Put spells known in player record
        For i = 1 To MAX_PLAYER_SPELLS
            If PlayerSpells(i) <> 0 Then
                .picSpell(Int(i - 1)).Picture = LoadPicture(App.Path & "\gfx\spells\icons\" & Trim$(Spell(i).Frame) & ".bmp")
            Else
                .picSpell(Int(i - 1)).Picture = Nothing
            End If
        Next
    End With
End Sub

Apparently, this line returns 0 as the frame...
Code:
                .picSpell(Int(i - 1)).Picture = LoadPicture(App.Path & "\gfx\spells\icons\" & Trim$(Spell(i).Frame) & ".bmp")

And, obviously, this line from the Sub SpellEditorInit loads the picture the same way, and it works fine there...
Code:
        .scrlFrame = Spell(EditorIndex).Frame

So I have no idea what's wrong.... Well I am a newb in working with MS though...


Top
 Profile  
 
PostPosted: Mon Jul 06, 2009 3:42 pm 
Offline
Persistant Poster

Joined: Fri Jun 26, 2009 10:15 pm
Posts: 701
Google Talk: FAProductions
Why are you subtracting 1 from i at the start of it, but not anywhere else? That makes no sense..


Top
 Profile  
 
PostPosted: Mon Jul 06, 2009 4:32 pm 
Offline
Newbie

Joined: Sat Mar 21, 2009 11:27 am
Posts: 9
It makes perfect sense as the index for the picSpell starts with 0 and spell indexes starts with 1

Edit: Figured out I was wrong, I was supposed to use Trim$(Spell(PlayerSpells(i)).Frame) and not Trim$(Spell(i).Frame).. Thanks, you got me on the tought :D

Still suffering from the error though.... :S


Top
 Profile  
 
PostPosted: Sun Jul 19, 2009 7:52 pm 
Offline
Newbie

Joined: Sat Mar 21, 2009 11:27 am
Posts: 9
Bump


Top
 Profile  
 
PostPosted: Sun Aug 02, 2009 4:29 pm 
Offline
Newbie

Joined: Sat Mar 21, 2009 11:27 am
Posts: 9
Bump =(


Top
 Profile  
 
PostPosted: Wed Sep 09, 2009 1:42 pm 
Offline
Newbie

Joined: Sat Mar 21, 2009 11:27 am
Posts: 9
Bump

C'mon someone must know


Top
 Profile  
 
PostPosted: Wed Dec 01, 2021 11:04 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456097
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтsemiasphalticfluxсайтсайтсайт
сайтсайтсайтсайтсайтсайтhttp://taskreasoning.ruсайтсайтсайтинфосайтсайтtuchkasсайтсайт


Top
 Profile  
 
PostPosted: Fri Jan 14, 2022 11:17 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456097
Econ


Top
 Profile  
 
PostPosted: Fri Jan 14, 2022 11:18 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456097
142.3


Top
 Profile  
 
PostPosted: Fri Jan 14, 2022 11:20 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456097
Bett


Top
 Profile  
 
PostPosted: Fri Jan 14, 2022 11:21 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456097
Bett


Top
 Profile  
 
PostPosted: Fri Jan 14, 2022 11:22 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456097
Theo


Top
 Profile  
 
PostPosted: Fri Jan 14, 2022 11:23 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456097
From


Top
 Profile  
 
PostPosted: Fri Jan 14, 2022 11:24 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456097
Visi


Top
 Profile  
 
PostPosted: Fri Jan 14, 2022 11:25 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456097
Dyke


Top
 Profile  
 
PostPosted: Fri Jan 14, 2022 11:26 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456097
Rexa


Top
 Profile  
 
PostPosted: Fri Jan 14, 2022 11:27 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456097
Trac


Top
 Profile  
 
PostPosted: Fri Jan 14, 2022 11:29 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456097
Disn


Top
 Profile  
 
PostPosted: Fri Jan 14, 2022 11:30 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456097
Sony


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1738 posts ]  Go to page 1, 2, 3, 4, 5 ... 70  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 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:  
cron
Powered by phpBB® Forum Software © phpBB Group