Code: Show/Hide Public SubspaceBin As String
Public Sub LoadSubspaceBin() Dim Handle As Integer ' On Local Error GoTo Error_LoadSubspaceBin ' Handle = FreeFile Open App.Path & "\SUBSPACE.BIN" For Binary As #Handle ' If LOF(Handle) <> 630784 Then MsgBox App.Path & "\SUBSPACE.BIN is corrupted." & vbCrLf & "Exiting.", vbCritical, "Error" Unload Me Else SubspaceBin = String(630784, " ") Get #Handle, 1, SubspaceBin End If ' Close #Handle ' Exit Sub ' Error_LoadSubspaceBin: MsgBox "Can't find " & App.Path & "\SUBSPACE.BIN." & vbCrLf & "Exiting.", vbCritical, "Error" Unload Me End Sub |
Code: Show/Hide var SubSpaceBin:array[1..630784] of Char; procedure LoadSubSpaceBin(); var F:File; begin if not FileExists('subspace.bin') then exit; FillChar(SubSpaceBin,SizeOf(SubSpaceBin),Chr(0)); AssignFile(F, 'subspace.bin'); try Reset(F, 1); BlockRead(F, SubSpaceBin, SizeOf(SubSpaceBin)); finally CloseFile(F); end; end; |
Quote: |
The new version is scripted in C (!!!!!!!) |
nintendo64 wrote: |
That's how you store it in VB. |
Mr Ekted wrote: |
[..]
Wow VB is so gay. ![]() |
Mr Ekted wrote: |
BASIC, 1977 |