Abandoned [RELEASE] Trade Computer Extension

Status
Thread Closed: Not open for further replies.
Update (V1.41 Beta 3) released:





Changelog:
- Added new ship type "Diamondback Scout" (Powerplay).
- Changed ship type "Diamondback" to "Diamondback Explorer" at the personal.mdb (Powerplay).
- Fixed issue with date calculation.

I wanted to add a system when the new system panel didn't pop up by itself, I clicked TRADE panel by mistake while in an UNKNOWN STAR SYSTEM (in db but not previously visited)

Sub GetExploreStatus()

Dim SX As Double, SY As Double, SZ As Double, ZX As Double, ZY As Double, ZZ As Double, SID As Long, ZID As Long, z As Long, SZD As Double, ArDistance(1 To 50000) As Double
Dim ArExTemp As Variant, ArTemp As Variant, ArExploData As Variant, a As Long, zeile As Long, lLZeile As Long, ArStars As Variant, x As Long, ArRegSt As Variant, ArURegSt As Variant
ReDim ArExploData(1 To 100000, 1 To 8)

ArRegSt = Worksheets("DB_Stations").Range("Q2:Q" & AzRegStations + 1)
ArURegSt = Worksheets("DB_Stations_UR").Range("Q2:Q" & AzURegStations + 1)
' Dim t As Double
' t = Timer
' MsgBox Timer - t & " sec", , "Makrolaufzeit"

If ActualStarID <> Worksheets("ExploreData").Cells(2, 1).Value Or JR_Changed = True Then
x = 0
Worksheets("ExploreData").Range("A2:H1000001").ClearContents
Worksheets("Navigation_Sort").Range("S2:S" & AzStars + 1).ClearContents
SID = ActualStarID
SX = Ar_DBStars(SID, 3)
SY = Ar_DBStars(SID, 4)
SZ = Ar_DBStars(SID, 5)
For z = 1 To AzStars
ZID = Ar_DBStars(z, 1) ' Ziel Stern
ZX = Ar_DBStars(ZID, 3)
ZY = Ar_DBStars(ZID, 4)
ZZ = Ar_DBStars(ZID, 5)
ArDistance(z) = Round(Sqr(WorksheetFunction.Power((SX - ZX), 2) + WorksheetFunction.Power((SY - ZY), 2) + WorksheetFunction.Power((SZ - ZZ), 2)) + 0.000001, 2)
If ArDistance(z) <= Jump_Limit Then
x = x + 1
ArExploData(x, 1) = Ar_DBStars(z, 1) ' ID
ArExploData(x, 2) = Ar_DBStars(z, 2) ' Name
ArExploData(x, 3) = Ar_DBStars(z, 8) ' Class
If Val(Ar_DBStars(z, 8)) = 0 Then
ArExploData(x, 4) = "?"
Else
If Ar_DBStarTypes(Ar_DBStars(z, 8), 3) = 0 Then
ArExploData(x, 4) = "NO" ' Scoop
Else
ArExploData(x, 4) = "YES" ' Scoop
End If
End If
ArExploData(x, 5) = WorksheetFunction.CountIf(Worksheets("DB_Stations").Range("Q2:Q" & AzRegStations + 1), Ar_DBStars(z, 1)) + WorksheetFunction.CountIf(Worksheets("DB_Stations_UR").Range("Q2:Q" & AzURegStations + 1), Ar_DBStars(z, 1)) ' #Stations
ArExploData(x, 6) = Val(Ar_DBStars(z, 6)) ' ExploreStatus
ArExploData(x, 7) = ArDistance(z) ' Distance
ArExploData(x, 8) = Ar_DBStars(z, 7) ' Notes
End If
Next z
Worksheets("ExploreData").Range("A2:H" & x + 1) = ArExploData
Worksheets("ExploreData").Activate
ActiveWorkbook.Worksheets("ExploreData").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("ExploreData").Sort.SortFields.Add Key:=Range( _
"G2:G100001"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("ExploreData").Sort
.SetRange Range("A1:H100001")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
AzCarto = Worksheets("Data").Cells(14, 5).Value
Ar_Carto = Worksheets("ExploreData").Range("A2:H" & AzCarto + 1)
End If

End Sub
 
With 1.41 Beta 3 can't save updated commodities

When updating commodities with ocr everything fine till I push the save button. Then TCE crashes with Run-time error '13': Type mismatch. Tested in 2 stations.

Panel_Prices (Code), (BTN_Save, Click) StationData(8) = DateAdd("yyyy", 1286, Format(LocalTimeToUTC(Now), "DD.MM.YYYY"))

Also noticed new Salvage Item - SAP 8 CORE CONTAINER. Added it through Database Wares. The next time I started a scan TCE crashed on first scan page. Didn't capture error. Restarted TCE. This time no crashes on scan but did crash on save again with above error.

I get this error too.

Great work you're doing!
 
Hi Eventure and TCE lovers.
I just made a clean TCE install (1.41b3) with the default DB as my old one refused to work any more.
So i got few errors :

- When launching TCE, I have this one up to 6 times (edit : in fact the more I add stations or perhaps commodities, the more it pop when TCE starts) :
Start_Error.png

- Then when I jump in a new system or when I exit supercruise in a station sector, I have this error :
Jumping_Error.png

- I have this one when saving a station :
Saving_Station_Error.png

And this one when saving commodities :
Commodity_Saving_1.png
Commodity_Debug.png

- TCE only crash when saving commodities. I click "save" when Excel prompts me, restart TCE, and the commodities are just well saved. The only thing is "update required" in the Current Station Panel.

Did I miss something ? Else I hope this will help you to fix TCE. Thanks again for sharing this marvelous tool !

P.S :
Incompatibilité de type = type incompatibility (as you can guess)
Vrai = True.
Faux = False.

P.P.S : also these new trade goods are missing :
METALS : Osmium
SALVAGE : Sap 8 core container
 
Last edited:
Update (V1.41 Beta 4) released:



Changelog:
- Fixed further issues with date formating.
- Fixed issue with Trade panel, when in unknown star system
- Fixed issue in Add/Mod Commodity panel

Note:
Nearly all reported issue have to do with the date formating (UTC). All release versions are working fine here, of course i would not release a version with errors i found. So i think, its a localization issue.
I changed the code a little, so i hope, it is working now, but as i learned from Excel, i cant be sure.
With the new commodities, you have to add them through TCE.
Also, dont forget to add the commodities to EliteOCR.
 
Last edited:
With 1.41 Beta 3 error when updating commodity prices for first time after adding new commodity.

Added Osmium using Database >> Wares >> Add Commodity Record, chose Metals and average price. Saved with no issues.

Opened Commodity Panel. Reset all prices and clicked 'Start OCR Scan'. Chemicals page updates fine with new values. When button changes back to 'Start OCR Scan' but before pushing it to load second page TCE crashes with error popup Run-time error '9': Subscript out of range. After restarting TCE commodity scan works with no errors on subsequent attempts. TCE does still crash when saving commodities as noted above. Had same error after adding new Salvage item. Debug info:
__________________________________________
Stations (Code) , (General), Reset_Prices

Sub Reset_Prices()

Dim a As Long

For a = 1 To AzGoods
Ar_TmpWares(a, 1) = a
Ar_TmpWares(a, 2) = 0
Ar_TmpWares(a, 3) = 0
Ar_TmpWares(a, 4) = 0
Next a

Worksheets("DB_StPrices").Range("C" & Worksheets("Werte").Cells(91, 5).Value & ":F" & Worksheets("Werte").Cells(91, 5).Value + AzGoods - 1) = Ar_TmpWares

End Sub
 
I still have an "execution error 13" when saving commodities and "update required" is still there in Current Station Panel :
Commodities_Save.png

No more error on start. I gonna make some jumps and register new stations, and I'll let you know :)
 
Update (V1.41 Beta 4) released:
With the new commodities, you have to add them through TCE.
Also, dont forget to add the commodities to EliteOCR.

I get how to add the new commodities in TCE but unsure how to add them to EliteOCR, also can someone list all the new commodities that need to be added?
 
With 1.41 Beta 4 can't save updated commodities. New error

Updated 2 new commodities in Elite OCR. No issues with scanning. Checked table in commodities panel and both new commodities match station values. Everything fine till I push the save button. Then TCE crashes with popup. Text says Type mismatch. There is the number 13 in the popup header. Click OK to close popup. New popup Run-time error '13': Type Mismatch. Debug Info:

Panel_Prices (Code) , BTN_Save, Click

Call Position_Panel
Call Destination_Panel
Call Trade_Advisor
Call Panel_Trade.POS_Display
Call Panel_Trade.DES_Display
DoEvents
 
Update (V1.41 Beta 4) released:


Note:
Nearly all reported issue have to do with the date formating (UTC). All release versions are working fine here, of course i would not release a version with errors i found. So i think, its a localization issue.
I changed the code a little, so i hope, it is working now, but as i learned from Excel, i cant be sure.

No worries. New version always introduce new bugs. I still can't believe it works so well already after the PP update and all the time you must have put into this. Thanks again.
 
I get how to add the new commodities in TCE but unsure how to add them to EliteOCR, also can someone list all the new commodities that need to be added?


Don't know if this is the right way but I launched the EliteOCR app from my TCE installed folder. Chose Settings >> Commodity Editor >> Add Comodity. Added the 2 new commodities in CAPS to the eng column. Left fra and deu blank. Saved. Seems to work. Hope that was right.

METALS : OSMIUM
SALVAGE : SAP 8 CORE CONTAINER
 
With Beta 4, I get a mismatch error anytime TCE tries to update my location (going in and out of supercruise, or docking/undocking) [Edit: This seems to have disappeared, and is updating without error]

I randomly also get the following error

Error in Status Results
Error Line: 720
Error: (9) Subscript out of range

Followed by a 2nd error with Error; (9) replaced by
Error: (-2147024809) DataObject: SetText Invalid argument
 
Last edited:
With 1.41 Beta 4 Current Position Panel Update error

Whenever I change instances I notice that my current position panel is not updated and TCE is frozen. There is a popup that says Type mismatch and has the number 13 in the header. I click OK. The current position panel then updates to the correct station or system and TCE works fine.
 
Don't know if this is the right way but I launched the EliteOCR app from my TCE installed folder. Chose Settings >> Commodity Editor >> Add Comodity. Added the 2 new commodities in CAPS to the eng column. Left fra and deu blank. Saved. Seems to work. Hope that was right.

METALS : OSMIUM
SALVAGE : SAP 8 CORE CONTAINER

I tried doing the above and the new commodities seemed to be added ok but I still getting that type 13 mismatch when trying to save the commodities data.
 
Update (V1.41 Beta 5) released:



Changelog:
- Next try to fix the date issue, because i cant recreate it.
- Fixed issue, when adding new commodities.


Hangs now instead of crash. On saving commodities in 1.41 Beta 5 TCE hangs with new error popup. Error in Trade panel Error Line 30 Error: (13) Type mismatch. Trade information screen populates then TCE is frozen. Click OK on popup and it goes away and TCE unfreezes for a few seconds then the same popup is back. So its an infinite sequence of clearing the popup every few seconds. Quickly manages to exit TCE normally between popups.

Current Position Panel error reported in #2702 behavior unchanged.
 
Getting the same errors as Deslokk
Is it possible that it's a compatibility issue? As in we don't have something installed that we should?

Edit: Getting type 13 mismatch popups anytime I try to save anything actually, even though it appears to still save the info I put in
 
Last edited:
Getting the same errors as Deslokk
Is it possible that it's a compatibility issue? As in we don't have something installed that we should?

I'm running Windows 7-64bit, Excel and Access 2007 Professional with all updates, Region settings Location USA, Keboard English - US, Short date (M/d/yyyy), Long date (dddd, MMMM dd, yyyy) , Time Zone (UTC -6)

Its probably a regional date or timezone format type problem I think.
 
The loop error is as Deslokk typed out
The other error that I get whenever something is being saved is a popup that just says 'Type mismatch' - though the box title simply says '13'


I'm running Windows 7-64bit, Excel and Access 2007 Professional with all updates, Region settings Location USA, Keboard English - US, Short date (M/d/yyyy), Long date (dddd, MMMM dd, yyyy) , Time Zone (UTC -6)

Its probably a regional date or timezone format type problem I think.

I have 7-64bit, Excel and Access 2013 64bit Pro, UK Region settings Short (dd/MM/yyyy) Long (dd MMMM yyyy)

Also, the prestart.bat doesn't actually install the certs, unless you put the TCE.cer and install_font.vbs in the windows/system32 folder (at least for me), minor thing, but might be worth knowing
 
Last edited:
Status
Thread Closed: Not open for further replies.
Back
Top Bottom