Can't assign to array?
Can't assign to array?
Can't assign to array?
Can't assign to array?
Can't assign to array?
Can't assign to array? Can't assign to array? Can't assign to array? Can't assign to array? Can't assign to array? Can't assign to array? Can't assign to array? Can't assign to array?
Can't assign to array? Can't assign to array?
Can't assign to array?
Go Back  Xtreme Visual Basic Talk > > > Can't assign to array?


Reply
 
Thread Tools Display Modes
  #1  
Old 07-16-2004, 11:02 AM
Inkybro Inkybro is offline
Regular
 
Join Date: May 2004
Posts: 56
Default Can't assign to array?


I'm not exactly sure where this belonged but since I'm using Winsock I figured I'd put it here.

Code:
Private Sub sckUS_DataArrival(Index As Integer, ByVal BytesTotal As Long)
Dim strGData As String
Dim strNGData(0) As String

    sckUS(Index).GetData strGData
    If strGData = "~!ACpT" Then
        sckUS(Index).Close
        Unload sckUS(Index)
    Else
        strNGData = Split(strGData, "^")
        
        Open App.Path & "\accounts\" & strNGData(0) & ".dat" For Output As #1
            Print #1, strNGData(0)
            Print #1, strNGData(1)
            Print #1, strNGData(2)
        Close #1
    End If
End Sub
This is my code, I get a compile error "Cannot assign to array" or something like that and it points to the split line. Of course I can't understand why it's doing that so if someone could just point out how to correct this that'd be great!
Reply With Quote
  #2  
Old 07-16-2004, 12:01 PM
Myth's Avatar
Myth Myth is offline
Contributor
 
Join Date: Oct 2003
Location: Under your bed
Posts: 792
Default

strNGData has to be an undimenshioned array that would solve this problem
youve delcared it as an array with only 1 index :/ theres no point in doing that declare it like
Code:
Dim strNGData() as string
p.s. next time use vb tags
__________________
Please use [vb][/vb] tags when posting.
Reply With Quote
  #3  
Old 07-16-2004, 12:42 PM
Inkybro Inkybro is offline
Regular
 
Join Date: May 2004
Posts: 56
Default

Thanks, and I'll be sure to use VB tags next time
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Can't assign to array?
Can't assign to array?
Can't assign to array? Can't assign to array?
Can't assign to array?
Can't assign to array?
Can't assign to array? Can't assign to array? Can't assign to array? Can't assign to array? Can't assign to array? Can't assign to array? Can't assign to array?
Can't assign to array?
Can't assign to array?
 
Can't assign to array?
Can't assign to array?
 
-->