Contact | License

# 1204 - Variable '%s' contains %i elements, but loop is for %i elements.

Description
A ForEach loop has been defined to loop through several Arrays in parallel, but not all Arrays are of the same size.
Example
Config:
.Configs = { 'debug', 'release', 'master' } .Options = { 'a', 'b' } ForEach( .Config in .Configs, .Option in .Options ) { }
Output:
c:\Test\fbuild.bff(4):(21) FASTBuild Error #1204 - ForEach() - Variable '.Options' contains 2 elements, but loop is for 3 elements. .Option in .Options ) ^ \--here
Fix:
.Configs = { 'debug', 'release', 'master' } .Options = { 'a', 'b', 'c' } ForEach( .Config in .Configs, .Option in .Options ) { }