Fix minor spelling mistakes

This commit is contained in:
Fabian Wolff 2016-04-03 17:48:20 +02:00
parent c52b25d864
commit 14ac45d285
4 changed files with 5 additions and 5 deletions

View File

@ -560,7 +560,7 @@ sets the name of the native closure at the position idx in the stack. the name o
:param const SQChar * typemask: defines a mask to validate the parametes types passed to the function. if the parameter is NULL no typechecking is applyed(default).
:remarks: The typemask consists in a zero teminated string that represent the expected parameter type. The types are expressed as follows: 'o' null, 'i' integer, 'f' float, 'n' integer or float, 's' string, 't' table, 'a' array, 'u' userdata, 'c' closure and nativeclosure, 'g' generator, 'p' userpointer, 'v' thread, 'x' instance(class instance), 'y' class, 'b' bool. and '.' any type. The symbol '|' can be used as 'or' to accept multiple types on the same parameter. There isn't any limit on the number of 'or' that can be used. Spaces are ignored so can be inserted between types to increase readbility. For instance to check a function that espect a table as 'this' a string as first parameter and a number or a userpointer as second parameter, the string would be "tsn|p" (table,string,number or userpointer). If the parameters mask is contains less parameters than 'nparamscheck' the remaining parameters will not be typechecked.
Sets the parameters validation scheme for the native closure at the top position in the stack. Allows to validate the number of paramters accepted by the function and optionally their types. If the function call do not comply with the parameter schema set by sq_setparamscheck, an exception is thrown.
Sets the parameters validation scheme for the native closure at the top position in the stack. Allows to validate the number of parameters accepted by the function and optionally their types. If the function call do not comply with the parameter schema set by sq_setparamscheck, an exception is thrown.
*.eg*

View File

@ -205,7 +205,7 @@ int getargs(HSQUIRRELVM v,int argc, char* argv[],SQInteger *retval)
}
}
//if this point is reached an error occured
//if this point is reached an error occurred
{
const SQChar *err;
sq_getlasterror(v);

View File

@ -103,10 +103,10 @@ static SQInteger _sqstd_aux_printerror(HSQUIRRELVM v)
const SQChar *sErr = 0;
if(sq_gettop(v)>=1) {
if(SQ_SUCCEEDED(sq_getstring(v,2,&sErr))) {
pf(v,_SC("\nAN ERROR HAS OCCURED [%s]\n"),sErr);
pf(v,_SC("\nAN ERROR HAS OCCURRED [%s]\n"),sErr);
}
else{
pf(v,_SC("\nAN ERROR HAS OCCURED [unknown]\n"));
pf(v,_SC("\nAN ERROR HAS OCCURRED [unknown]\n"));
}
sqstd_printcallstack(v);
}

View File

@ -89,7 +89,7 @@ SQRESULT sqstd_format(HSQUIRRELVM v,SQInteger nformatstringidx,SQInteger *outlen
else {
n++;
if( nparam > sq_gettop(v) )
return sq_throwerror(v,_SC("not enough paramters for the given format string"));
return sq_throwerror(v,_SC("not enough parameters for the given format string"));
n = validate_format(v,fmt,format,n,w);
if(n < 0) return -1;
SQInteger addlen = 0;