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
Line 38 :
'System.Collections.Generic.List<Sandbox.ModAPI.Ingame.
IMyTerminalBlock>' does not contain a definition for
'GetActionWithName' and no extension method
'GetActionWithName' accepting a first argument of type
'System.Collections.Generic.List<Sandbox.ModAPI.Ingame.
IMyTerminalBlock>' could be found ,are you missing a
using directive or an assembly reference?
to this;
You need the [i] part. That code is contained in something called a for loop[msdn.microsoft.com], essentially it means "for" each item in a list go through one at a time (until the list is completed) executing some code (in this case the code to close all the doors). That [i] is a reference to which item in the list we want to execute code on. Each time the loop runs it adds 1 to the value of i, so it increments through the list onto the next item. So for example this;
In this example I have used 1 instead of i. This would execute that code against the second item in the list (because just to add confusion technically 0 is the first item in a list, 1 is second, 2 is third and so on). If you put 2 you would close the third door in the list and so on.
I hope this explains it!