Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
DEntis-T committed Jul 2, 2024
1 parent 04d2bd9 commit bc209f4
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 13 deletions.
15 changes: 15 additions & 0 deletions doc/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,21 @@ myretref is 0

Unlike most of the functions, whose return 0 for failed operation and 1 for successful operation, this one returns 65535 for failed operation and integer distance (difference) between 2 strings. In example above, `myretref` is 0 because the 2 strings are the same.


### Form: `persistent`
- Exports or imports a variable depending on lastly used persistent data management decorator.

```cpp
@export
this->typename=int
this->from=var
this->to=newvar
data.persistent
```

#### Returns
Just returns 1.

---------------------------------------------------------------------------------

## Component: `pawn`
Expand Down
14 changes: 14 additions & 0 deletions doc/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,18 @@ pawn.callfunction.remote("funcname");

```pawn
system.rem.log("Test");
```

### Function: `data.persistent`

#### Method: `export`

```pawn
data.persistent.export
```

#### Method: `import`

```pawn
data.persistent.import
```
25 changes: 12 additions & 13 deletions doc/persistent.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,27 @@
## Example

```cpp

#restemp
using data
new[int]myvariable=327
console.println.log("myvariable is {myvariable}")
myretref=327
console.println.log("myretref is {myretref}")

@export
this->typename=int
this->from=myvariable
this->to="pspdmftest"
data.testfunc
this->from=myretref
this->to=pspdmftest
data.persistent

myvariable=0
console.println.log("myvariable is {myvariable}")
myretref=0
console.println.log("myretref is {myretref}")

@import
this->typename=int
this->from="pspdmftest"
this->to=myvariable
data.testfunc

console.println.log("myvariable is {myvariable}")
this->from=pspdmftest
this->to=myretref
data.persistent

console.println.log("myretref is {myretref}")
```


Expand Down
Binary file modified scriptfiles/index.ps
Binary file not shown.

0 comments on commit bc209f4

Please sign in to comment.