Skip to content

Commit 1b218c9

Browse files
warn of deprecated design
1 parent 21e38b9 commit 1b218c9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Code/ContextSystem/Contexts/VariableDefinition/PlayerVariableDefinitionContext.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
using SER.Code.ContextSystem.Structures;
1+
using Exiled.API.Features;
2+
using SER.Code.ContextSystem.Structures;
23
using SER.Code.TokenSystem.Tokens;
34
using SER.Code.TokenSystem.Tokens.VariableTokens;
45
using SER.Code.ValueSystem;
56
using SER.Code.VariableSystem.Variables;
7+
using Log = SER.Code.Helpers.Log;
68

79
namespace SER.Code.ContextSystem.Contexts.VariableDefinition;
810

@@ -13,6 +15,12 @@ protected override (TryAddTokenRes result, Func<PlayerValue> parser) AdditionalP
1315
{
1416
if (token is ParenthesesToken { RawContent: "" })
1517
{
18+
Log.Warn(
19+
token.Script,
20+
$"Using () to create an empty player variable will be removed in future versions of SER. " +
21+
$"Please use the @empty variable to create an empty variable instead."
22+
);
23+
1624
return (TryAddTokenRes.End(), () => new([]));
1725
}
1826

0 commit comments

Comments
 (0)