name: duk_require_uint proto: | duk_uint_t duk_require_uint(duk_context *ctx, duk_idx_t idx); stack: | [ ... val! ... ] summary: |

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

example: | printf("unsigned int value: %lu\n", (unsigned long) duk_require_uint(ctx, -3)); tags: - stack introduced: 1.0.0