KeyWorld Posted February 8, 2014 Posted February 8, 2014 Hi, Just a suggestion about freeloop, would be great to add the argument as optional to get back the current value of freeloop. BUILDIN_FUNC(freeloop) { if( script_hasdata(st,2) ) { st->freeloop = !!script_getnum(st,2); } script_pushint(st, st->freeloop); return SCRIPT_CMD_SUCCESS; } BUILDIN_DEF(freeloop,"?"), The idea here is to return the value of freeloop without modifying it. Why exactly ? Just imagine an intensive function you want to build but return to normal state after : function script intensiveFunction { // Save the current value of freeloop set .@state, freeloop(); freeloop(1); //dothis; //dothat; //get back to the original state freeloop(.@state); return; } 1
Recommended Posts