Native functions are functions inside the host application. Has nothing to do with creating a function list. Just so happens that pawno does this, but it's not what they are intended for (just making sure you know what native functions are). To truly create one you'd need to create a plugin.
https://raw.githubusercontent.com/compup...n-lang.pdf
Anyway, now the correct way to create custom function (snippet) list: You'll need a .code-snippets file in your .vscode directory for that. Syntax is as follows:
For example: ./.vscode/my-functions.code-snippets
More (and better) information about snippets here: https://code.visualstudio.com/docs/edito...edsnippets
https://raw.githubusercontent.com/compup...n-lang.pdf
Quote:The only means that a pawn program has to manipulate objects in the host application is by calling subroutines, so called ?native functions?, that the host application provides.
Anyway, now the correct way to create custom function (snippet) list: You'll need a .code-snippets file in your .vscode directory for that. Syntax is as follows:
Code:
{
"FunctionName": { //Displayed on the right of the popup
"prefix": "FunctionName", //Displayed on the left of the popup
"description": "Little description about the function", //Not displayed, as far as I know
"body": "FunctionName()$0" //Text to insert to your file when the function is selected. See code below for an example of two of your functions
}
}
Code:
{
"SEM": {
"prefix": "SEM",
"description": "Send an error message to a player",
"body": "SEM(${1:playerid}, ${2:yourstring[]})$0"
},
"AddOwnableCarData": {
"prefix": "AddOwnableCarData",
"description": "Add ownable car data",
"body": "AddOwnableCarData(${1:vehicleid}, ${2:OC_SQL_ID}, ${3:plus}, ${4:new_value})$0"
}
}
More (and better) information about snippets here: https://code.visualstudio.com/docs/edito...edsnippets