KeyWorld Posted February 8, 2014 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 379 Reputation: 304 Joined: 11/10/11 Last Seen: December 2, 2014 Share 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 Link to comment Share on other sites More sharing options...
Euphy Posted February 8, 2014 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted February 8, 2014 Implemented in de46393. Link to comment Share on other sites More sharing options...
Recommended Posts