View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0003934 | Spring engine | General | public | 2013-08-12 17:04 | 2013-08-13 01:43 | ||||
Reporter | ikinz | ||||||||
Assigned To | abma | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 94.1.1+git | ||||||||
Target Version | 95.0 | Fixed in Version | |||||||
Summary | 0003934: unitsync: GetPrimaryModIndex() always returns -1 | ||||||||
Description | At least since 94.1.1-875-g4e58b8b GetPrimaryModName() fails for all installed mods with an exception of ZK missions. Likely solution: https://github.com/spring/spring/commit/a813447139a01deede046723db1194c929f8704c changed GetName() to GetNameVersioned() in GetPrimaryModName(). I assume the same change is needed in GetPrimaryModIndex(). | ||||||||
Steps To Reproduce | int i; Init(0, 0); int count = GetPrimaryModCount(); printf("mod count: %i\n", count); for(i = 0; i < count; i++) printf("mod index for %s (%i): %i\n", GetPrimaryModName(i), i, GetPrimaryModIndex(GetPrimaryModName(i))); ==== mod count: 14 mod index for Air Force Command r93 (0): 0 mod index for Asteroid Mining r152 (1): 1 mod index for Evolution RTS - test-604 (2): -1 mod index for Evolution RTS - test-611 (3): -1 mod index for Evolution RTS - v6.42 (4): -1 mod index for Tutorial - Running Start r177 (5): 5 mod index for Zero-K test-11020 (6): -1 mod index for Zero-K test-11021 (7): -1 mod index for Zero-K test-11022 (8): -1 mod index for Zero-K test-11024 (9): -1 mod index for Zero-K test-11092 (10): -1 mod index for Zero-K v1.1.7.7 (11): -1 mod index for Zero-K v1.1.8.0 (12): -1 mod index for Zero-K v1.1.8.1 (13): -1 | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
ikinz (reporter) 2013-08-12 17:18 |
>At least since 94.1.1-875-g4e58b8b GetPrimaryModName() fails for all installed mods with an exception of ZK missions. Looks like I can't edit the issue. I meant GetPrimaryModIndex(). |
abma (administrator) 2013-08-12 17:43 |
https://github.com/spring/spring/blob/develop/tools/unitsync/unitsync.cpp#L1471 |
abma (administrator) 2013-08-13 01:43 |
GetPrimaryModName() is deprecated! don't use it! https://github.com/spring/spring/blob/develop/tools/unitsync/unitsync_api.h#L1251 |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2013-08-12 17:04 | ikinz | New Issue | |
2013-08-12 17:18 | ikinz | Note Added: 0011301 | |
2013-08-12 17:41 | abma | Target Version | => 95.0 |
2013-08-12 17:43 | abma | Note Added: 0011303 | |
2013-08-12 20:58 | abma | Assigned To | => abma |
2013-08-12 20:58 | abma | Status | new => assigned |
2013-08-13 01:42 | abma | Changeset attached | => spring develop 1931f00c |
2013-08-13 01:42 | abma | Status | assigned => resolved |
2013-08-13 01:42 | abma | Resolution | open => fixed |
2013-08-13 01:43 | abma | Note Added: 0011304 |