For loops allow empty statements, but they do not allow definining variables. This is C standard syntax. A random crash message means you have a random crash in your script, but has nothing to do with empty statements in for loops.