Mirage Source
Loading Editor - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17)
+---- Thread: Loading Editor (/showthread.php?tid=2305)



Loading Editor - Mattyw - 26-10-2008

Basically, before you edit an Item or NPC or so, there's an Index that lists all of them. But for some reason, on my 2 new Editors, the Names only show on the Index afetr I click Save when clicking on one of the Numbers.

Shouldn't this populate the list with the Names?:

Code:
Case "crafteditor"
            InCraftEditor = True
            
            frmIndex.Show
            frmIndex.lstIndex.Clear
            
            ' Add the names
            For i = 1 To MAX_CRAFTS
                frmIndex.lstIndex.AddItem i & ": " & Trim$(Craft(i).Name)
            Next i
            
            frmIndex.lstIndex.ListIndex = 0
            Exit Sub

Help? :S


Re: Loading Editor - Kraft - 26-10-2008

Try putting:
Code:
frmIndex.Show
After all.


Re: Loading Editor - Mattyw - 26-10-2008

None of the other things have that after. & it didn't work. :S


Re: Loading Editor - Dragoons Master - 26-10-2008

Try removing every On Error Resume Next of the code. Then you'll see the real errors Wink


Re: Loading Editor - Mattyw - 26-10-2008

Dragoons Master Wrote:Try removing every On Error Resume Next of the code. Then you'll see the real errors Wink

There are only "On Error Resume Next"'s on stuff to do with Chatbox, so it won't affect it. :S


Re: Loading Editor - Ambientiger - 27-10-2008

I find it handy to add a zero list item before trying to populate the rest of it, try something like
Code:
frmIndex.lstIndex.AddItem "None", 0
also helps when referencing the ListIndex, saves messing about with +1 and all that. Smile


Re: Loading Editor - Rian - 27-10-2008

JoinGame needs something like:

Code:
Call SendUpDateNewThing(Index)

and then the sub would be like

Code:
Sub SendUpDateNewThing(ByVal Index As Long)
Dim Packet As String

Packet = "UPDATENEWTHING" & SEP_CHAR

For i = 1 to MAX_NEWTHING
    Packet = Packet & NewThing(i).Name & SEP_CHAR
Next i

Packet = Packet & END_CHAR

End Sub

And you'll need a packet client side. Reverse engineer it from the sub I gave you Tongue This is all pseudo code, might not be exactly correct (especially if you're using MS4, this is based on the packet system in earlier versions of mirage)


Re: Loading Editor - Mattyw - 27-10-2008

I missed such a simple thing.

Quote:Call SendVocs(Index)
Call SendCrafts(Index)

Had to make them Subs. It now works, they display! Big Grin

Thanks Sonire. Big Grin