Skip to content

Commit

Permalink
private
Browse files Browse the repository at this point in the history
  • Loading branch information
DEntis-T committed Jul 30, 2024
1 parent 2dcfa57 commit 77b0186
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
- [Call templates](doc/template.md)
- [Miscellaneous](doc/misc.md)
- [TCI](doc/usingfor.md)
- [Private functions](doc/private.md)

### Other info

Expand Down
20 changes: 20 additions & 0 deletions doc/private.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Private functions
- Private functions in PawnScript are functions that cannot be accessed outside the PawnScript scope, in other words, these functions can't be called using the SDK.

Example:
```cpp
void myPrivateFunc() private
{
//foo
}
```
Doing this in your Pawn script will not work:
```pawn
#include <open.mp>
#include <a_pawnscript>
main()
{
CallPawnScriptFunction("myPrivateFunc","");
}
```

0 comments on commit 77b0186

Please sign in to comment.