Server Help

Trash Talk - "subspace.bin" in memory?

Qndre - Sat Mar 20, 2004 10:36 am
Post subject: "subspace.bin" in memory?
The file "subspace.bin" cannot be loaded and stored in a variable by my application because it produces an overflow. I need to load the "subspace.bin" to generate the security checksum. What should I do?
D1st0rt - Sat Mar 20, 2004 10:49 am
Post subject:
look at the new MERVBot(.40), Catid has managed to do away with needing subspace.bin in the directory
Qndre - Sat Mar 20, 2004 11:08 am
Post subject:
I've got the source of a very old version of MERV scripted in Basic and this version isn't able to send checksums. The new version is scripted in C (!!!!!!!) and I am not able to read/write C.
CypherJF - Sat Mar 20, 2004 12:12 pm
Post subject:
Maybe this is the point where you should take the advice of ekted, and others, learn it.
nintendo64 - Sat Mar 20, 2004 1:00 pm
Post subject:
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


That's how you store it in VB.

Example in Pascal

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;


-nintendo64
D1st0rt - Sat Mar 20, 2004 1:42 pm
Post subject:
Quote:
The new version is scripted in C (!!!!!!!)

It's actually C++
Mr Ekted - Sat Mar 20, 2004 4:53 pm
Post subject:
nintendo64 wrote:
That's how you store it in VB.


Wow VB is so gay. icon_smile.gif
nintendo64 - Sun Mar 21, 2004 12:41 am
Post subject:
Mr Ekted wrote:
[..]



Wow VB is so gay. icon_smile.gif


yes, you have to write so much =/

btw Ekted, what is the first programming language you learnt?

-nintendo64
Mr Ekted - Sun Mar 21, 2004 1:04 am
Post subject:
BASIC, 1977
Mine GO BOOM - Sun Mar 21, 2004 2:44 am
Post subject:
Mr Ekted wrote:
BASIC, 1977

Ohh... I was QBASIC back in sometime or another. I still love that Monkey game that you threw bananas that explode at each other. Now I must go find it...
Mr Ekted - Sun Mar 21, 2004 6:30 am
Post subject:
After BASIC, it was: Fortran (1982), Pascal (1983), Assembler (1984), C (1984). I picked up C++ at work (1993). I've also played with several other langauges. So far nothing comes close to C. It's at the right level to be able to do exactly what you want in a manner than you don't have to jury-rig every little thing (like using a "string" as a buffer in BASIC). C++ is a hack.
Cyan~Fire - Sun Mar 21, 2004 12:50 pm
Post subject:
Heh mine was TI-BASIC for their calcs.

Here's gorilla.bas Miney, great game icon_biggrin.gif
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group