Fandom

武装突袭 Wiki

Error Type String Expected Code

简体 | 繁體

4,827个页面创建
于此维基上
添加新页面
评论0 Share

您使用了广告屏蔽软件!


Wikia通过广告运营为用户提供免费的服务。我们对用户通过嵌入广告屏蔽软件访问网站进行了使用调整。

如果您使用了广告屏蔽软件,将无法使用我们的服务。请您移除广告屏蔽软件,以确保页面正常加载。

This error occurs when there is a syntax error contained inside a block of code that makes up part of another statement. The error will be identified as being part of the original statement, not on the specific line where it actually occurs. For instance, if there is a syntax error inside an if statement's "then" block or "else" block, the error will be identified in front of the "then" keyword or "else" keyword respectively.


Compatibility:

Version Unknown


Example:

if (_USD + _USDcent + _CAD + _CADcent + _ZWD == 0) then { hint "Your wallet is empty."; } else { _output = "Your wallet contains:"; if (_USD+_USDcent > 0) then { _output = _output + format["\n- United States Dollars: %1.%2 USD", _USD, _USDcent]; } <-- Missing semicolon if (_CAD+_CADcent > 0) then { _output = _output + format["\n- Canadian Dollars: %1.%2 CAD", _CAD, _CADcent]; } <-- Missing semicolon if (_ZWD > 0) then { _output = _output + format["\n- Zimbabwean Dollars: %1 ZWD", _ZWD]; } <-- Missing semicolon ... hint _output; };

There are missing semicolons on each of the if statements within the else block, but the error will be identified as being before the "else" statement as "Type String, Expected Code".


See Also:

更多维基

随机维基