You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/readme-expert.md
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -167,16 +167,14 @@ You will note that all these new features either use existing keywords, `#`, or
167
167
168
168
### More Tags
169
169
170
-
open.mp includes introduce many more tags to functions and callbacks. These are useful in the long run, but slightly annoying to upgrade to. There are three symbols: `NO_TAGS`, `WEAK_TAGS`, and `STRONG_TAGS`; that you can define before including `<open.mp>`, each one enabling progressively more checks.
171
-
172
-
To make the transition easier, the default is `NO_TAGS`, but you can also make tags *weak*:
170
+
open.mp includes introduce many more tags to functions and callbacks. These are useful in the long run, but slightly annoying to upgrade to. There are three symbols: `NO_TAGS`, `WEAK_TAGS`, and `STRONG_TAGS`; that you can define before including `<open.mp>`, each one enabling progressively more checks:
173
171
174
172
```pawn
175
-
#define WEAK_TAGS
173
+
#define STRONG_TAGS
176
174
#include <open.mp>
177
175
```
178
176
179
-
In this case, most old code uses will simply give a warning when the wrong tag is found:
177
+
To encourage some adoption, the default is `WEAK_TAGS`. Most old code uses will simply give a warning when the wrong tag is found:
180
178
181
179
```pawn
182
180
// Gives a warning:
@@ -218,17 +216,17 @@ You can enable `void:` tag warnings with a define before including `open.mp`, th
218
216
#include <open.mp>
219
217
```
220
218
221
-
Again, you can make these new tags *weak*, meaning that you get warnings when passing untagged values to tagged parameters, but not the other way around. This applies to function returns so saving a tag result in an untagged variable will not give a warning:
219
+
For parameters the default is to make these new tags *weak*, meaning that you get warnings when passing untagged values to tagged parameters, but not the other way around. This applies to function returns so saving a tag result in an untagged variable will not give a warning. This second group can also be upgraded by specifying the use of *strong* tags instead:
222
220
223
221
```pawn
224
-
#define WEAK_TAGS
222
+
#define STRONG_TAGS
225
223
#include <open.mp>
226
224
```
227
225
228
-
This second group can also be upgraded by specifying the use of *strong* tags instead:
226
+
Alternatively, if you need to move your legacy codebase as is:
The SA:MP includes had a mixture of both English (`Bumper`, `Armour`, `Petrol`, etc) and American (`Color`, `Hood`, `Stereo`, etc) spellings of words. The open.mp includes have introduced *more* variants, for example `Trunk` has now been added as an alternative spelling to `Boot`; but along-side this change have settled on canonical and deprecated variants. In line with the code in the server itself, the English spellings are the preferred variants going forwards.
363
+
The SA:MP includes had a mixture of both British English (`Bumper`, `Armour`, `Petrol`, etc) and American English (`Color`, `Hood`, `Stereo`, etc) spellings of words. The open.mp includes have introduced *more* variants, for example `Trunk` has now been added as an alternative spelling to `Boot`; but along-side this change have settled on canonical and deprecated variants. In line with the code in the server itself, the British spellings are the preferred variants going forwards; and while American spellings will continue to be supported indefinitely some have had warnings added to notify users of this consistency improvement. if you wish to stick with the mixed spellings you can add a define to the top of your code:
Copy file name to clipboardExpand all lines: documentation/readme-intermediate.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -126,17 +126,17 @@ main()
126
126
}
127
127
```
128
128
129
-
To make the transition easier, the default is `NO_TAGS`. The tags can also be *weak* - passing an integer instead of an enum value is a warning, but the reverse isn't:
129
+
The tags are all *weak* - passing an integer instead of an enum value is a warning, but the reverse isn't. The latter can be enabled by making the tags *strong*:
130
130
131
131
```pawn
132
-
#define WEAK_TAGS
132
+
#define STRONG_TAGS
133
133
#include <open.mp>
134
134
```
135
135
136
-
The latter can be enabled by making the tags *strong*:
136
+
Alternatively, if you need to move your legacy codebase as is:
* after modifying the textdraw and the change will be visible.</remarks>
387
387
*/
388
388
#if!defined MIXED_SPELLINGS
389
-
#pragma deprecated Use `TextDrawBackgroundColor`. To silence this warning and use different spellings define `MIXED_SPELLINGS` or define `SAMP_COMPAT` for general SA-MP API compatibility.
389
+
#pragma deprecated Use `TextDrawBackgroundColour`. To silence this warning and use different spellings define `MIXED_SPELLINGS` or define `SAMP_COMPAT` for general SA-MP API compatibility.
0 commit comments