Skip to content

Commit

Permalink
Note on syntax.
Browse files Browse the repository at this point in the history
  • Loading branch information
Y-Less authored Nov 6, 2023
1 parent 3f3058b commit a061870
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion YSI_Server/y_natives/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ main()
}
```

The true ("external") name of the native is the first parameter of the `@native` decorator, then the called function should have a slightly different name (here `TRY_CreateDynamicObject`).
The true ("external") name of the native is the first parameter of the `@native` decorator, then the called function should have a slightly different name; the "internal" name, here `TRY_CreateDynamicObject`. Normal `native` syntax for the same would be:

```pawn
native STREAMER_TAG_OBJECT:TRY_CreateDynamicObject(/* params */) = CreateDynamicObject;
```

I went back and forth on using that syntax or the chosen decorator syntax, but since this is a decorator I think it is best to stick to the [well documented decorator syntax](https://github.com/pawn-lang/YSI-Includes/blob/5.x/annotations.md).

### Example 2: Checking first

Expand Down

0 comments on commit a061870

Please sign in to comment.