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
pname;lcd1;lcd2;;false;
if you have a projector called pname, two LCDs called lcd1 and lcd2, no third lcd, no light armor and want to use the average grid yield ports
"Program(61,7) Error: 'IMyTextPanel' does not contain a definition for 'WritePublicText' and no accessible extension method
'WritePublicText' accepting a first argument of type 'IMytextPanel' could be found (are you missing a using directive or an assembly reference?)"
Last issue observed was "Caught exception during execution of script, the given key was not present in the dictionary"
Update of blockDD is too heavy IMHO, m.b. just diag message with name of undef block and concat DLCs and MODs units for manualy adding? Anyway, thank You, pall! )) PS im a litlbit dummy at these Qs
at last string blockDefinitionData after $cockpit have to insert
*SmallBlockCapCockpit=0:20,1:10,5:1,6:4,3:15,12:10
for supporting new cabin from last DLC.
infuture, need to modify function GetTotalComponents for catches undefined BLOCKs in blockDefinitionData. For example, i inserted in this function the string
Echo(blockName);
and i can see - why script was crushed.
and Thank You for your script!
build info (https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2921132802) ,
rotary airlocks (https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1359954841) ,
speed (https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1244218931) ,
hangar doors (https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1592955843) ,
dangerous decompression (https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2921132802)
Im assuming the mods that add in new blocks may be causing issues?
Caught exception during execution of script:The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Program.GetComponents(String definition)
at Program.GetTotalComponents(IMyProjector projector)
at Program.Main(String argument, UpdateType updateReason)
at Sandbox.Game.Entities.Blocks.MyProgrammableBlock.<>c__DisplayClass42_0.<ExecuteCode>b__0(IMyGridProgram program)
at Sandbox.Game.Entities.Blocks.MyProgrammableBlock.RunSandboxedProgramActionCore(Action`1 action, String& response)
This is my first time running a script so I apologize if there is something stupid Im doing wrong.
private double GetRefineryEffectiveness(IMyRefinery r)
{
string info = r.DetailedInfo;
int startIndex = info.IndexOf(effectivenessString) + effectivenessString.Length;
string perc = info.Substring(startIndex, info.IndexOf("%", startIndex) - startIndex);
try
{
return effectivenessMapping[perc];
}
catch (Exception)
{
return int.Parse(perc) / 100d;
}
}
Throw exception on Ukrainian client lang
inpute string was not in a correct format
Need write something about that in config private const string effectivenessString = "Effectiveness:"; // the text shown in terminal which says the current effectiveness (= yield bonus) of the selected refinery
Or add try-catch for
return int.Parse(perc) / 100d;
With default
Caught exception during execution of script: The given key was not present in the dictionary.
at
System.ThrowHelper.ThrowKeyNotFoundException()
at
System.Collections.Generic.Dictionary`2.get_item(TKey
Key)
at
Program.GetComponents(String
definition)
at
Program.GetTotalComponents(IMyProject
or
Projector)
at
Program.Main(String
argument,
UpdateType
UpdateReason)
at
Sandbox.Game.Entities.Blocks.MyProgra
mmableBlock.<>c__DisplayClass42_0.<
ExecuteCode>b__0(IMyGridProgram
program)
at
Sandbox.Game.Entities.Blocks.MyProgra
mmableBlock.RunSandboxedProgramAct
ionCore(Action`1
action,
String&
response)
Thnx!
Would you mind if I re-uploaded your script with support for shield mods and certain weaponcore mods?