OpenDream icon indicating copy to clipboard operation
OpenDream copied to clipboard

Weirdly-valid indented code causes a compile error

Open ike709 opened this issue 1 year ago • 1 comments

This code is in Eternia:

// snip
    if(target)
        SpawnSmite(caster, target.loc,spell_dmg)
        projectilesleft--
    var/list/turfs = new/list()
        for(var/turf/T in oview(7,target.loc))
            turfs += T
    while(projectilesleft && turfs.len > 0)
// snip

Note the for loop that has extra indentation.

It (surprisingly) compiles in BYOND but doesn't in OpenDream with an Expected end of proc statement error

ike709 avatar Sep 29 '24 02:09 ike709

Why does this compile in byond

ZeWaka avatar Sep 29 '24 23:09 ZeWaka