mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-01-31 13:00:59 +00:00
Print only one error message when PlayerPawn.Face is not 3 chars long
This commit is contained in:
parent
57e0c97867
commit
3c8423d810
1 changed files with 2 additions and 9 deletions
|
@ -2358,14 +2358,7 @@ DEFINE_CLASS_PROPERTY_PREFIX(player, face, S, PlayerPawn)
|
||||||
FString tmp = str;
|
FString tmp = str;
|
||||||
|
|
||||||
tmp.ToUpper();
|
tmp.ToUpper();
|
||||||
if (tmp.Len() != 3)
|
bool valid = (tmp.Len() == 3 &&
|
||||||
{
|
|
||||||
bag.ScriptPosition.Message(MSG_WARNING,
|
|
||||||
"Invalid face '%s' for '%s';\nSTF replacement codes must be 3 characters.\n",
|
|
||||||
tmp.GetChars(), info->TypeName.GetChars ());
|
|
||||||
}
|
|
||||||
|
|
||||||
bool valid = (
|
|
||||||
(((tmp[0] >= 'A') && (tmp[0] <= 'Z')) || ((tmp[0] >= '0') && (tmp[0] <= '9'))) &&
|
(((tmp[0] >= 'A') && (tmp[0] <= 'Z')) || ((tmp[0] >= '0') && (tmp[0] <= '9'))) &&
|
||||||
(((tmp[1] >= 'A') && (tmp[1] <= 'Z')) || ((tmp[1] >= '0') && (tmp[1] <= '9'))) &&
|
(((tmp[1] >= 'A') && (tmp[1] <= 'Z')) || ((tmp[1] >= '0') && (tmp[1] <= '9'))) &&
|
||||||
(((tmp[2] >= 'A') && (tmp[2] <= 'Z')) || ((tmp[2] >= '0') && (tmp[2] <= '9')))
|
(((tmp[2] >= 'A') && (tmp[2] <= 'Z')) || ((tmp[2] >= '0') && (tmp[2] <= '9')))
|
||||||
|
@ -2373,7 +2366,7 @@ DEFINE_CLASS_PROPERTY_PREFIX(player, face, S, PlayerPawn)
|
||||||
if (!valid)
|
if (!valid)
|
||||||
{
|
{
|
||||||
bag.ScriptPosition.Message(MSG_WARNING,
|
bag.ScriptPosition.Message(MSG_WARNING,
|
||||||
"Invalid face '%s' for '%s';\nSTF replacement codes must be alphanumeric.\n",
|
"Invalid face '%s' for '%s';\nSTF replacement codes must be 3 alphanumeric characters.\n",
|
||||||
tmp.GetChars(), info->TypeName.GetChars ());
|
tmp.GetChars(), info->TypeName.GetChars ());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue