Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mirage File - Compile Error
#1
Right, it's been a very long time since I've looked at any code and the first issue I have come across is this.

Compile Error:
Method or Data Member not found.


This occurs when I try to compile run the client.

This issue occurs when running the below code and I've highlighted where the fault starts.

Code:
Public Sub TcpInit()

    ' used for parsing packets
    SEP_CHAR = vbNullChar ' ChrW$(0)
    END_CHAR = ChrW$(237)
    
   ' check if IP is valid
    If IsIP(GAME_IP) Then
        frmMirage.Socket.RemoteHost = GAME_IP
        frmMirage.Socket.RemotePort = GAME_PORT
    Else
        MsgBox GAME_IP & " does not appear as a valid IP address!"
        DestroyGame
    End If
        
End Sub

This is what Visual Basic highlights

Code:
frmMirage.Socket.RemoteHost = GAME_IP
This is most likely a simple problem that loads of people have fixed and maybe the answer is already on this forum but through my searching I have only seen one post similar.

Their problem was that the server did not have a Winsock object. Mine does, and I am also using MS4 ( well MS 3.76 ).

If anyone could help me out, I'd really appreciate it.

Thanks.



-Lochie
Reply
#2
Set your GAME_IP to = "127.0.0.1"
Reply
#3
It is set to "127.0.0.1", that is it's default address.
Reply
#4
It can't find the physical socket.
Reply
#5
Yeah I was thinking that too.
I just tried finding the object "frmMirage.Socket" and it is a Picture Box, that's not right.
Reply
#6
Then delete it, add another Winsock Control to frmMirage, and name it Socket.
Reply
#7
Screw it, I fixed it. Well not me, but VB did.

All I had to do was add the Winsock component to the Tool bar. Simple as that.

What a silly mistake and noob-like attitude I had.

Sorry for wasting space.

Lol.


-Lochie
Reply
#8
Hey, you're new to all this. Don't consider it wasting space. We'd have bashed you if you were doing that. Lol.
Reply
#9
New to this? Me?

I'm not new to Visual Basic 6 or to Mirage source, well this new one is a little different.
If you check my profile you'll see I've been a member for quite some time. Obviously it's been a long time since I've come to this site. The last engine I worked on was Elysium.
Which obviously is a re-make of this. I've just not used VB6 in about 3 years. Visual Basic is a thing of the past in my life, C++ and Java seem to have taken over.
Recently I heard that Mirage has a new owner and it getting back to the old way so I thought I'd pop in and have a look.

Using a Vista computer now so I'm bound to back in the error section soon.

Thanks again though for you help and speed in which you replied. It's nice to see this forum becoming more active. I remember when I was the only one online for a while. I should have taken advantage really and spammed.


-Lochie
Reply
#10
Vista doesn't mean errors. Trust me. Just right click the shortcut for VB6, go to properties, go to the compatibility tab and check the "disable desktop composition" or w/e it is. It'll disable the Aero UI while VB is open. Helps when messing with forms and such.

Other than that, you gotta have UAC disabled to register the right files and shit you need.

After all that, it's just like running it on XP.
Reply
#11
My vista theme is off already and UAC is the most annoying feature of Vista. They are always deactivated.
Also I enable the Administrator account via DOS to eliminate any other issues that may occur from all this unwanted sercurity.

Lea Wrote:Um..... who are you?

Why do you ask?

I'm silent normally, don't often post. So you wouldn't know me, although saying that I don't recognise half the names I've seen around. Besides Mith, although he's on every forum to do with RPG Engines. I was so eager to see him complete Godborn. :?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)