sq_createslot

Squirrel 3.0

sq_createslot

SQRESULT sq_createslot(HSQUIRRELVM v, SQInteger idx);

pops a key and a value from the stack and performs a set operation on the table or class that is at position idx in the stack, if the slot does not exits it will be created.

parameters:
HSQUIRRELVM v

the target VM

SQInteger idx

index of the target table in the stack

return:

a SQRESULT

remarks:

invoke the _newslot metamethod in the table delegate. it only works on tables. [this function is deperecated since version 2.0.5 use sq_newslot() instead]