mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +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;
|
||||
|
||||
tmp.ToUpper();
|
||||
if (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 = (
|
||||
bool valid = (tmp.Len() == 3 &&
|
||||
(((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[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)
|
||||
{
|
||||
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 ());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue