=proto double duk_require_number(duk_context *ctx, int index); =stack [ ... val! ... ] =summary

Like duk_get_number(), but throws an error if the value at index is not a number or if the index is invalid.

=example printf("value: %lf\n", duk_require_number(ctx, -3)); =tags stack