Floor() function failing

Example of problem, any suggestions as to what I am doing wrong.

function testeval()
var temp_test=d6/2;
var returnval=floor(temp_test);
return returnval


debug output

JavaScript Runtime Error
Object expected
Line: 2 Pos: 0
var returnval=floor(temp_test);
Eval'd Code: testeval()


  • I think its just the "d6". That may have to be d6(), or you may have to roll your own dice function. I don't remember off hand if the designer has those built in.

  • d6() works, it's the actual floor function that is failing, but, I wrote my own that works as a work around.

Leave a Comment