I was looking at some of the code (the 2.4), and you can shorten quite a few of the functions:
In PubStuff:
Public Function GetBaseMult(BaseNum As Double) As Long GetBaseMult = (BaseNum-1)*292 End Function ------------------------------------------------------------- Public Function GetHex(ToGet As String) As Integer GetHex = Asc(ToGet) End Function ------------------------------------------------------------- Public Function CheckMonth(MonthNum As String) As String 'Select Case blocks are prefered for descisions like this, in VB they 'can use strings as well as numbers, and can be set to cover a range '([1 to 6] or [a to d]) and can take multiple arguments ([a to d, A to D]) 'and can use comparisons as well ([>5], [<f]) 'I cast MonthNum to a numeric value to ensure matching wouldn't get '"wierd" though it shouldn't matter Select Case Val(MonthNum) Case 0 CheckMonth = "Jan" Case 1 CheckMonth = "Feb" Case 2 CheckMonth = "Mar" Case 3 CheckMonth = "Apr" 'Continue cases as above Case 11 CheckMonth = "Dec" End Select End Function ------------------------------------------------ Public Function LoadUFOP() 'not sure about this one, but it should work since 'the caption is a string, if it was a value you could 'cast it to a string as you concatenated 'Note that the final Else that throws is not capturing 'the error it says it is. The entire If-Then-Else set is 'only testing the value stored in the lblLoad.Caption 'which is set by the Options at the top of the form 'and by nothing else, the values that can be set are 'know and will the final else will never throw. mHandle5 = FreeFile Open MyPath & "\game_" & frmBaseEditor.lblLoad.Caption & "\up.dat" For Binary As #mHandle5 'Rest of code that follows the End If is unchanged End Function ------------------------------------------------If I'm going to play with the code, I'd rather play with the most recent.
Thnx, Robert
BTW, in case you had't seen, check this out: http://www.ufo-extraterrestrials.com/; also, the UFO series by Altair are good (Aftershock, Aftermath, and Afterlight), You should also check out the X-com WIKI, lots of DATs decrypted: http://en.wikipedia.org/wiki/X-COM
Edited by Chaman, 06 March 2007 - 10:40 PM.