#XenonCode.com gives different results than ingame
1 messages · Page 1 of 1 (latest)
strange...have you tried == 0.0?
Just checked, same result.
Not good...i hope this is just a strange case here and not normal in all other. Up now i do not had a problem with using 1 and 0 as boolean. But these had no decimal places... And i hope we get in future real boolean too 😉
I guess it's just a version difference between the game and the website.
ah..so it's only wrong on the website? I see...
Yeah, the game is alright.
The standalone xenoncode cli is also correct
thats weird
Small compilation issue with the executable used on xenoncode.com
It's fixed
Thanks!
well, still something wrong on website.
terminate called after throwing an instance of 'XenonCode::ParseError'
what(): Invalid first word 'start' in the global scope in ./main.xc:9
timeout: the monitored command dumped core
Aborted
var $end :text
function @coord ($x:number, $y:number, $z:number) :text
var $stringcoord = ".x{" & $x:text & "}.y{" & $y:text & "}.z{" & $z:text & "}"
return $stringcoord
init
$start = @coord(20,20,20)
$end = @coord(10,10,20)
print(text("From ({},{},{}) to ({},{},{}) we get:",$start.x,$start.y,$start.z,$end.x,$end.y,$end.z))
print(text("Distance = {}",sqrt(pow(($end.x-$start.x),2) + pow(($end.y-$start.y),2) + pow(($end.z-$start.z),2))))```
This same code was running fine just 20 minutes ago.
It's like it's not seeing the $ in $start
and now it works... seems pasting a block of code it doesn't parse correctly. Have to paste one line at a time.
If I understand correctly, it seems there's a problem between spaces and tabs