confusing error in vb6-file not found

getting a "file not found" error

Page 1 of 1

2 Replies - 11222 Views - Last Post: 11 January 2011 - 02:44 PM Rate Topic: -----

#1 mapmd1234   User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 157
  • Joined: 04-December 09

confusing error in vb6-file not found

Posted 09 January 2011 - 02:50 PM

OK, I figured out what the issue was with my last post, but now I'm confused... I am getting a "file not found" error and I know the file exists because I can see it when I browse to the folder its located in. here is my code...
Option Explicit
Dim nme As String


Private Sub Form_Load()
fileops.load (App.path & "\" + nme + ".txt")
LBLusername = Stats.CI.charactername
LBLexphave = Stats.CI.exphave
LBLexpneeded = Stats.CI.expneed
End Sub

that is the file that tries to load said file... and here comes the code in which the error is coming from which is supposed to load the file...
Public Sub load(path As String)
intf = FreeFile
x = 0
'shroud.decrypt (path)
Open path For Input As #intf
    Input #intf, name
    Input #intf, pass
    Do Until EOF(intf)
        Input #intf, temp
        If temp = name Or temp = pass Then
            temp = ""
        Else
        x = x + 1
            For c = 1 To Len(temp)
                letter = Mid(temp, c, 1)
                If letter = "1" Or letter = "2" Or letter = "3" Or letter = "4" Or letter = "5" Or letter = "6" Or letter = "7" Or letter = "8" Or letter = "9" Then
                    Sstat(x) = Sstat(x) + letter
                End If
            Next c
        End If
    Loop
For x = 1 To 22
    stat(x) = Val(Sstat(x))
Next x
Stats.CI.species = stat(1)
Stats.CI.agility = stat(2)
Stats.CI.password = pass
Stats.CI.charactername = name
Stats.CI.dextersity = stat(3)
Stats.CI.dodge = stat(4)
Stats.CI.endurance = stat(5)
Stats.CI.health = stat(6)
Stats.CI.intelect = stat(7)
Stats.CI.parry = stat(8)
Stats.CI.speed = stat(9)
Stats.CI.strength = stat(10)
Stats.CI.totalexp = stat(11)
Stats.CI.currenthealth = stat(12)
Stats.CI.exphave = stat(13)
Stats.CI.expleftover = stat(14)
Stats.CI.expneed = stat(15)
Stats.CI.level = stat(16)
Stats.CI.magicpotency = stat(17)
Stats.CI.maxdamage = stat(18)
Stats.CI.MaxHealth = stat(19)
Stats.CI.mindamage = stat(20)
Stats.CI.skillpoints = stat(21)
Stats.CI.stamina = stat(22)
Stats.CI.turnspeed = stat(23)
Close #intf
'shroud.encrypt (path)
End Sub


any and all help is greatly appreciated seeing as the last topic I opened had no replies...so thank you if you help.


EDIT: just saw I accidentally posted in the game forum and not the vb6 forum, I apologize for this...

This post has been edited by mapmd1234: 09 January 2011 - 02:53 PM


Is This A Good Question/Topic? 0
  • +

Replies To: confusing error in vb6-file not found

#2 Ionut   User is offline

  • D.I.C Lover
  • member icon

Reputation: 386
  • View blog
  • Posts: 1,057
  • Joined: 17-July 10

Re: confusing error in vb6-file not found

Posted 10 January 2011 - 03:02 PM

Did you put a breakpoint or a watch to see what value has "path" when enter in "Load" method? Maybe you put an extra character there.
Was This Post Helpful? 0
  • +
  • -

#3 mapmd1234   User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 157
  • Joined: 04-December 09

Re: confusing error in vb6-file not found

Posted 11 January 2011 - 02:44 PM

View PostIonut, on 10 January 2011 - 02:02 PM, said:

Did you put a breakpoint or a watch to see what value has "path" when enter in "Load" method? Maybe you put an extra character there.


I would check that if I could...but sadly, I somehow managed to completely erase the load function...
not quite sure how that happened, but I am waiting on my partner in code to reply to my email that stated such and waiting for his copy of the load function to be sent back to me...

I will follow up with a reply upon that happening.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1