Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[VB.NET] Byte problem :[

Custom Title Activated
Loyal Member
Joined
May 18, 2006
Messages
2,065
Reaction score
14
What is a byte exactly? When I make a function that requires a byte.

I put in any number between 0 - 255, but it errors that it cannot be converted to 1 dimensional array. <_<
 
Divine Celestial
Loyal Member
Joined
Jul 7, 2004
Messages
853
Reaction score
5
sage



(Yet another proof that VB is not a real programming language and all those that use it are hopeless n00bs...)
 
Custom Title Activated
Loyal Member
Joined
May 18, 2006
Messages
2,065
Reaction score
14
I know it isn't a real programming language, but it gets the task done. ;]
 
Junior Spellweaver
Joined
Mar 21, 2006
Messages
129
Reaction score
0
What is a byte exactly? When I make a function that requires a byte.

I put in any number between 0 - 255, but it errors that it cannot be converted to 1 dimensional array. <_<

Visual Basic.NET is supposed to be simple, but your question doesn't make much sense. I wrote a tiny program that demonstrates how to set a byte, how to read it and how to change it.

Code:
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        'start my sub
        mySub()

    End Sub

    Private Sub mySub()
        'declare variable as byte and set value 20
        Dim myByte As Byte = 20

        'display result from my function in a messagebox
        MsgBox(myFunction(myByte).ToString)

        'change byte variable to value 80
        myByte = 80

        'again display result from my function in a messagebox
        MsgBox(myFunction(myByte).ToString)
    End Sub

    Private Function myFunction(ByVal anyByte As Byte) As Boolean
        If anyByte > 60 Then
            Return True
        Else
            Return False
        End If
    End Function

End Class
 
Divine Celestial
Loyal Member
Joined
Jul 7, 2004
Messages
853
Reaction score
5
sage

but your question doesn't make much sense.
Because he obviously has no knowledge whatsoever of the functioning of a computer, and attempts to proceed will fail until he gains said knowledge.

sage for bumping old thread
 
Back
Top