Hi ive got a odd problem,
#libstart = 20
libcount = libstart
MessageRequester("",Str(libstart),0)
shouldnt libstart = 20? its shown as 0 in the message box,
edit: well i got what i wanted working with globals, also im wondering how i could read just one line in a txt file?
i have a file setout like
Divider
html
<hr>
id like to read in the first line into a string then the second leaveing it so the next read part will be after those 2 lines.
i normally use blitzbasic but tbh blitz+ aint really enuff yet:) lol but blitz3d is still my top prog for 3d apps, any help would be great.
ps. there was a odd bug earlier, i opened each file in a loop and closed after i opened them (before i opened the next) and they were copied to my programs root folder o_O.
constant bugged?
-
TheVelvetTeddyBear
- New User

- Posts: 4
- Joined: Tue May 27, 2003 9:49 pm
constant bugged?
Last edited by TheVelvetTeddyBear on Tue May 27, 2003 9:58 pm, edited 1 time in total.
-
TheVelvetTeddyBear
- New User

- Posts: 4
- Joined: Tue May 27, 2003 9:49 pm
Hi TVTB
Form the help. -(Press F1)- about File.
There is an example about stuff you maybe could use or modify for that purpose.
Bedst regards
Henrik
Form the help. -(Press F1)- about File.
There is an example about stuff you maybe could use or modify for that purpose.
Code: Select all
;
; ------------------------------------------------------------
;
; PureBasic - File example file
;
; (c) 2001 - Fantaisie Software
;
; ------------------------------------------------------------
;
MessageRequester("PureBasic", "Welcome !"+Chr(13)+"PureBasic will write a file named: PureBasicTestFile.pb", 0)
If CreateFile(0, "PureBasicTestFile.txt")
WriteStringN(" This is a PureBasic file test")
WriteString("Now it's on ")
WriteString("the same line.")
CloseFile(0)
Else
MessageRequester("PureBasic", "Error: can't write the file", 0)
End
EndIf
If ReadFile(0, "PureBasicTestFile.txt")
First$ = Trim(ReadString())
MessageRequester("PureBasic", "Line read: "+First$, 0)
CloseFile(0)
Else
MessageRequester("PureBasic", "Error: Can't read the file", 0)
EndIf
End
Henrik
