Mirage Source http://miragesource.net/forums/ |
|
Sign Errors http://miragesource.net/forums/viewtopic.php?f=201&t=1800 |
Page 1 of 1 |
Author: | James [ Mon May 14, 2007 3:35 am ] |
Post subject: | Sign Errors |
When initiating the Sign Editor, after adding Signs into my game, i simply mimicked how the editor was setup in the other editors, such as NPCs, and items. However, when the frmIndex loads, it lists 1-MAX_SIGNS (500 in this case), however it does not list the names, even though the code states: Code: ' ::::::::::::::::::::::::
' :: Sign editor packet :: ' :::::::::::::::::::::::: If (LCase(Parse(0)) = "signeditor") Then InSignEditor = True frmIndex.Show frmIndex.lstIndex.Clear ' Add the names For I = 1 To MAX_SIGNS frmIndex.lstIndex.AddItem I & ": " & Trim$(Sign(I).name) Next I frmIndex.lstIndex.ListIndex = 0 Exit Sub End If The name WILL appear in the editor itself though, which I find odd, yet I know there is a difference since the editor grabs information including the name sent by the server. So why is it that the Index will show the names of NPCs and Spells, coded the same way, but not signs? |
Author: | Tosuxo [ Mon May 14, 2007 11:01 am ] |
Post subject: | |
did you send the sign data before sending the request to open the index list? i.e. change the sub which sends the sign data list to also send a list of names... easy code to do, i'd paste it but i ain't re-installed VB6 yet... lol |
Author: | James [ Mon May 14, 2007 11:44 am ] |
Post subject: | |
Thing is, none of the other editor subs do that until you actually initiate the editor itself. |
Author: | Matt [ Mon May 14, 2007 12:51 pm ] |
Post subject: | |
I think what he meant, was are you passing the sign name off to the editor when you place the name in the list box. I too have this issue with signs, and I have yet to figure it out. Been awhile since I tried too though. |
Author: | Tosuxo [ Mon May 14, 2007 1:34 pm ] |
Post subject: | |
tell you what guys, once i re-install VB6, I'll post a tutorial fix for signs to make them show in the list fair? ![]() |
Author: | Robin [ Mon May 14, 2007 3:31 pm ] |
Post subject: | |
Is the name been sent in the packet? |
Author: | James [ Mon May 14, 2007 9:20 pm ] |
Post subject: | |
I did signs myself. ![]() Anyhow, no, the packet does not include the sign names, it shouldnt need to. items and other things do not have names sent in the Index listing packet. |
Author: | Rezeyu [ Mon May 14, 2007 11:24 pm ] |
Post subject: | |
... Did you remember to make a 'Type SignRec' For lstIndex to draw the Sign.Name from? ..Scratch that, If you said it loads to txtName just fine. |
Author: | Da Undead [ Tue May 15, 2007 2:26 am ] |
Post subject: | |
Rezeyu wrote: ...
Did you remember to make a 'Type SignRec' For lstIndex to draw the Sign.Name from? ..Scratch that, If you said it loads to txtName just fine. Ya I think thats his problem, don't forget to add Code: Public Sign() As SignRec
and ReDim Sign(1 To MAX_SIGNS) As SignRec in modClientTCP and the actual SignRec in the middle of modTypes ![]() |
Author: | Rezeyu [ Tue May 15, 2007 2:29 am ] |
Post subject: | |
No, that can't be it, because Magnus said that it DOES display the name of the sign in the editor, which should be txtName... And just like all editors I'm assuming that his sign Editor's txtName draws from Sign.Name.. Which means he already has the SignRec Unless txtName is loaded some other way for the sign tut, in which case maybe I was right in the first place. |
Author: | Tosuxo [ Tue May 15, 2007 12:05 pm ] |
Post subject: | |
Rezeyu wrote: No, that can't be it, because Magnus said that it DOES display the name of the sign in the editor, which should be txtName...
And just like all editors I'm assuming that his sign Editor's txtName draws from Sign.Name.. Which means he already has the SignRec Unless txtName is loaded some other way for the sign tut, in which case maybe I was right in the first place. yes but when you select the sign from the index list it sends data to the server to get the info for that sign this won't be perfectly right but when you call for sign editor to open, add this code before the data is sent saying the sign editor can be opened: Server Side: Code: dim Sn as long dim SnPacket as string SnPacket = "signnames" for Sn = 1 to MAX_SIGNS SnPacket = SnPacket & SEP_CHAR & trim(sign(Sn).name) next Sn SnPacket = SnPacket & SEP_CHAR & END_CHAR call senddatato(index, SnPacket) Client Side (clientTCP, forgotten the sub name, the data one): Code: if lcase(parse(0)) = "signnames" then
dim Sn as long for Sn = 1 to MAX_SIGNS sign(Sn).name = trim(parse(Sn)) next Sn exit sub end if That will add all of the sign names to the client which is going to edit them before you get the index list, then it can show the names ON the list if there's any bugs, please tell me, cheers ![]() |
Author: | James [ Wed May 16, 2007 2:18 am ] |
Post subject: | |
Thanks. that worked and now the sign name displays. ![]() |
Author: | Tosuxo [ Wed May 16, 2007 10:51 am ] |
Post subject: | |
Magnus wrote: Thanks. that worked and now the sign name displays.
![]() yehhhh i ruleeee ![]() |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |