Results 1 to 10 of 10
  1. #1
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    9,119
    Reputation
    1096
    Thanks
    1,970
    My Mood
    Doh

    Illelag Craps In Path

    Code:
    K:\GSC Compiler v5.0\GSC Compiler v5.0\bin\Release\library\includes\common_scripts\_fx.gsc
    Can some1 tell me where are the illegal characters there?
    Last edited by ♪~ ᕕ(ᐛ)ᕗ; 07-09-2011 at 12:27 PM.

  2. #2
    Auxilium's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    深い碧の果てに
    Posts
    4,518
    Reputation
    445
    Thanks
    609
    My Mood
    Happy
    If you are using it in code you need two \\

    example

    C:\\users\\bob\\documents\\text.txt

  3. #3
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    9,119
    Reputation
    1096
    Thanks
    1,970
    My Mood
    Doh
    no no.
    I actually placed some files on a folder at the startup path of my app. In the textbox when the user imports one of those files it will add each imported file to a list, and then parse them. The files buffer are going to be added to an other list.

    So I don't place only one path. here's the code for importing the buffer and the files....
    Code:
        ''' <summary>
        ''' Gets every included file's
        ''' </summary>
        ''' <remarks></remarks>
        Public Sub GetIncluded()
            Dim calledFiles As New List(Of String)
            Dim tScr As String() = scr.Split(vbCrLf)
            For Each x In tScr
                If *****ntains("#include") Then
                    calledFiles.Add(x)
                End If
            Next
            For Each xp In calledFiles
                Dim file As String = xp.Replace("#include ", "")
                Incs.Add(file.Replace(";", ""))
            Next
        End Sub
    
        ''' <summary>
        ''' Fills the buffer with the included file's text
        ''' </summary>
        ''' <remarks></remarks>
        Public Sub ParseFiles()
            For Each x In Incs
                Dim dir As String = Path.Combine(CurDir() & "\library\includes\", x)
                dir = dir.Insert(dir.Length, ".gsc")
                MsgBox(dir)
                For Each xpp As Char In Path.GetInvalidPathChars()
                    Dim f As String = Path.GetPathRoot(dir)
                    For Each xp In f
                        If xpp = xp Then
                            MsgBox("Cannot parse file '" & f & "'. Invaild path characters found.")
                        End If
                    Next
                Next
                Using sRead As New StreamReader(dir)
                        Form1.status = "Parsing file..." & dir
                        Buffer.Add(sRead.ReadToEnd)
                End Using
            Next
            Form1.status = "Ready"
        End Sub
    But if the file has a "_" it will throw a message, Invalid characters in path or something....

  4. #4
    Auxilium's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    深い碧の果てに
    Posts
    4,518
    Reputation
    445
    Thanks
    609
    My Mood
    Happy
    quick solution: don't use a _ ?

  5. #5
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    9,119
    Reputation
    1096
    Thanks
    1,970
    My Mood
    Doh
    Quote Originally Posted by Virtual Void View Post
    quick solution: don't use a _ ?
    but the filename has a _, I can't remove it. Those are scripts for a game.

  6. #6
    freedompeace's Avatar
    Join Date
    Jul 2010
    Gender
    female
    Posts
    3,033
    Reputation
    340
    Thanks
    2,792
    My Mood
    Sad
    Quote Originally Posted by Huey Freeman View Post
    no no.
    I actually placed some files on a folder at the startup path of my app. In the textbox when the user imports one of those files it will add each imported file to a list, and then parse them. The files buffer are going to be added to an other list.

    So I don't place only one path. here's the code for importing the buffer and the files....
    Code:
        ''' <summary>
        ''' Gets every included file's
        ''' </summary>
        ''' <remarks></remarks>
        Public Sub GetIncluded()
            Dim calledFiles As New List(Of String)
            Dim tScr As String() = scr.Split(vbCrLf)
            For Each x In tScr
                If *****ntains("#include") Then
                    calledFiles.Add(x)
                End If
            Next
            For Each xp In calledFiles
                Dim file As String = xp.Replace("#include ", "")
                Incs.Add(file.Replace(";", ""))
            Next
        End Sub
    
        ''' <summary>
        ''' Fills the buffer with the included file's text
        ''' </summary>
        ''' <remarks></remarks>
        Public Sub ParseFiles()
            For Each x In Incs
                Dim dir As String = Path.Combine(CurDir() & "\library\includes\", x)
                dir = dir.Insert(dir.Length, ".gsc")
                MsgBox(dir)
                For Each xpp As Char In Path.GetInvalidPathChars()
                    Dim f As String = Path.GetPathRoot(dir)
                    For Each xp In f
                        If xpp = xp Then
                            MsgBox("Cannot parse file '" & f & "'. Invaild path characters found.")
                        End If
                    Next
                Next
                Using sRead As New StreamReader(dir)
                        Form1.status = "Parsing file..." & dir
                        Buffer.Add(sRead.ReadToEnd)
                End Using
            Next
            Form1.status = "Ready"
        End Sub
    But if the file has a "_" it will throw a message, Invalid characters in path or something....
    The underscore (_) is a valid path character.


    In fact, that entire path you posted up there is valid, assuming that K: is valid.

  7. #7
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    9,119
    Reputation
    1096
    Thanks
    1,970
    My Mood
    Doh
    Quote Originally Posted by freedompeace View Post


    The underscore (_) is a valid path character.


    In fact, that entire path you posted up there is valid, assuming that K: is valid.
    well actually K: is valid since when I formatted my PC the local disk D didn't appear, so I used diskpart to change the letter and it worked.

  8. #8
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    Dim dir As String = Path.Combine(CurDir() & "\library\includes\", x)
    I don't do VB so not sure, but shouldnt that & be a +? also try \\ instead of \
    Ah we-a blaze the fyah, make it bun dem!

  9. The Following User Says Thank You to Hell_Demon For This Useful Post:

    HeavenlyRage (08-16-2011)

  10. #9
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    9,119
    Reputation
    1096
    Thanks
    1,970
    My Mood
    Doh
    Quote Originally Posted by Hell_Demon View Post
    Dim dir As String = Path.Combine(CurDir() & "\library\includes\", x)
    I don't do VB so not sure, but shouldnt that & be a +? also try \\ instead of \
    well in that case & and + are the same. But if I use \\ instead of \, in the final result it will be:
    K:\\GSCCompiler\\blabla\\blabla\\

  11. #10
    freedompeace's Avatar
    Join Date
    Jul 2010
    Gender
    female
    Posts
    3,033
    Reputation
    340
    Thanks
    2,792
    My Mood
    Sad
    Quote Originally Posted by Hell_Demon View Post
    Dim dir As String = Path.Combine(CurDir() & "\library\includes\", x)
    I don't do VB so not sure, but shouldnt that & be a +? also try \\ instead of \
    That's VB syntax. x)

Similar Threads

  1. cheating on crap flash games
    By Hyperion in forum General Game Hacking
    Replies: 2
    Last Post: 12-26-2006, 11:01 AM
  2. crap address
    By Hyperion in forum MapleStory Hacks, Cheats & Trainers
    Replies: 8
    Last Post: 12-10-2006, 02:33 PM
  3. holy crap, me posts...
    By Beer_Hunter in forum Spammers Corner
    Replies: 1
    Last Post: 10-15-2006, 03:38 PM
  4. Holy freaking crap
    By Dave84311 in forum General
    Replies: 3
    Last Post: 10-13-2006, 11:54 AM
  5. Crap!
    By jeremywilms in forum WarRock - International Hacks
    Replies: 3
    Last Post: 07-09-2006, 10:29 AM