Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Console logs:
`attempted index: getDisplayName of non-table: null
function: AlterProfessionDescription -- file: SpawnProfessionItems.lua line # 202 | MOD: Occupation Starting Items
java.lang.RuntimeException: attempted index: getDisplayName of non-table: null
`
The highlighted line in your script: "desc = desc .. "\n- " .. it:getDisplayName()" in function AlterProfessionDescription()
In the loading order, your mod comes after Mar mods.
Do you need additional logs to fix this?
Unfortunately I couldn't figure how to get the display names of each item from each item ID within the code, so I just hard coded the descriptions as a temporary fix. However if there is a demand for translation I'll have a look at it again and see if I can get it working this time, thank you for letting me know about this issue!
Currently, the text strings are hardcoded, which makes translation challenging. Have you considered using text variables/keys that reference external language files? This would allow players to translate the mod easily without modifying the core code.
This change could effectively encourage the Steam Workshop community to translate your mod. I’d love to hear your thoughts—would you consider it?
for i, item in ipairs(Items[profession]) do
local newItem = playerObj:getInventory():AddItem(item);
if newItem:getMaxAmmo() > 0
then
newItem:setCurrentAmmoCount(newItem:getMaxAmmo())
if item ~= "Base.M14Clip" and item ~= "Base.556Clip"
then
newItem:setRoundChambered(true);
newItem:setContainsClip(true);
end
end
end
Well, this is quite outrageous.
The design concept of this mod is excellent.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3396258947