Author |
Message |
Qndre Server Help Squatter

Gender: Joined: Jan 25 2004 Posts: 295 Offline
|
Posted: Sat Mar 20, 2004 10:36 am Post maybe stupid 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?
|
|
Back to top |
|
 |
D1st0rt Miss Directed Wannabe

Age:37 Gender: Joined: Aug 31 2003 Posts: 2247 Location: Blacksburg, VA Offline
|
Posted: Sat Mar 20, 2004 10:49 am Post maybe stupid Post subject: |
 |
|
|
|
look at the new MERVBot(.40), Catid has managed to do away with needing subspace.bin in the directory _________________
|
|
Back to top |
|
 |
Qndre Server Help Squatter

Gender: Joined: Jan 25 2004 Posts: 295 Offline
|
Posted: Sat Mar 20, 2004 11:08 am Post maybe stupid 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.
|
|
Back to top |
|
 |
CypherJF I gargle nitroglycerin

Gender: Joined: Aug 14 2003 Posts: 2582 Location: USA Offline
|
Posted: Sat Mar 20, 2004 12:12 pm Post maybe stupid Post subject: |
 |
|
|
|
Maybe this is the point where you should take the advice of ekted, and others, learn it. _________________ Performance is often the art of cheating carefully. - James Gosling
|
|
Back to top |
|
 |
nintendo64 Seasoned Helper

Age:40 Gender: Joined: Dec 01 2002 Posts: 104 Location: Dominican Republic Offline
|
Posted: Sat Mar 20, 2004 1:00 pm Post maybe stupid Post subject: |
 |
|
|
|
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
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
|
|
Back to top |
|
 |
D1st0rt Miss Directed Wannabe

Age:37 Gender: Joined: Aug 31 2003 Posts: 2247 Location: Blacksburg, VA Offline
|
Posted: Sat Mar 20, 2004 1:42 pm Post maybe stupid Post subject: |
 |
|
|
|
Quote: | The new version is scripted in C (!!!!!!!) |
It's actually C++
|
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Sat Mar 20, 2004 4:53 pm Post maybe stupid Post subject: |
 |
|
|
|
nintendo64 wrote: | That's how you store it in VB. |
Wow VB is so gay.  _________________ 4,691 irradiated haggis!
|
|
Back to top |
|
 |
nintendo64 Seasoned Helper

Age:40 Gender: Joined: Dec 01 2002 Posts: 104 Location: Dominican Republic Offline
|
Posted: Sun Mar 21, 2004 12:41 am Post maybe stupid Post subject: |
 |
|
|
|
Mr Ekted wrote: | [..]
Wow VB is so gay.  |
yes, you have to write so much =/
btw Ekted, what is the first programming language you learnt?
-nintendo64
Last edited by nintendo64 on Sun Mar 21, 2004 1:30 am, edited 1 time in total |
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Sun Mar 21, 2004 1:04 am Post maybe stupid Post subject: |
 |
|
|
|
BASIC, 1977
|
|
Back to top |
|
 |
Mine GO BOOM Hunch Hunch What What

Age:42 Gender: Joined: Aug 01 2002 Posts: 3615 Location: Las Vegas Offline
|
Posted: Sun Mar 21, 2004 2:44 am Post maybe stupid 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...
|
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Sun Mar 21, 2004 6:30 am Post maybe stupid 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.
|
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Sun Mar 21, 2004 12:50 pm Post maybe stupid Post subject: |
 |
|
|
|
Heh mine was TI-BASIC for their calcs.
Here's gorilla.bas Miney, great game  _________________ This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
Gorilla.bas
gorilla.rar - 8.41 KB
File downloaded or viewed 8 time(s)
|
|
Back to top |
|
 |
|