+
+ if(function->custom) {
+ out << ind << "sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, " << function->parameter_spec << ");\n";
+ } else {
+ out << ind << "sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, \"";
+
+ out << "x|t";
+
+ if(!function->parameters.empty())
+ {
+ std::vector<Parameter>::iterator p = function->parameters.begin();
+
+ // Skip the first parameter since its a HSQUIRRELVM that is
+ // handled internally
+ if (function->suspend) {
+ ++p;
+ } else if (p->type.atomic_type == HSQUIRRELVMType::instance()) {
+ ++p;
+ }
+
+ for(; p != function->parameters.end(); ++p) {
+ if(p->type.atomic_type == &BasicType::INT) {
+ out << "i";
+ } else if(p->type.atomic_type == &BasicType::FLOAT) {
+ out << "n";
+ } else if(p->type.atomic_type == &BasicType::BOOL) {
+ out << "b";
+ } else if(p->type.atomic_type == StringType::instance()) {
+ out << "s";
+ } else {
+ out << ".";
+ }
+ }
+ }
+ out << "\");\n";
+ }
+