ID:2830747
 
Resolved
Calling gradient(list, index) with a non-constant list as the first argument resulted in a "bad gradient" runtime error.
BYOND Version:514
Operating System:N/A
Web Browser:N/A
Applies to:Dream Daemon
Status: Resolved (515.1594)

This issue has been resolved.
Descriptive Problem Summary:

Calling gradient() in the gradient(list, index) format only works correctly if the list is a compile-time constant. If the list is supplied as a var, it says "bad gradient".

Code Snippet (if applicable) to Reproduce Problem:
var/list/G = list(0, "#f00", 1, "#0f0", space=COLORSPACE_HSL)
src << gradient(G, 0.5)


Expected Results:

The call should succeed, as documented in the reference.

Actual Results:

Runtime error with "bad gradient".
Lummox JR resolved issue with message:
Calling gradient(list, index) with a non-constant list as the first argument resulted in a "bad gradient" runtime error.