Loading

Paste #pym4p67ue

  1. diff -r 5ec05bde6098 nml/grfstrings.py
  2. --- a/nml/grfstrings.py Sun Oct 16 19:30:32 2016 +0200
  3. +++ b/nml/grfstrings.py Fri Dec 09 20:16:27 2016 +0100
  4. @@ -161,7 +161,8 @@
  5.  
  6.  def com_parse_string(val, lang_id):
  7.      import nml.expression
  8. -    if not isinstance(val, (nml.expression.StringLiteral, nml.expression.String)):
  9. +    # Check for string, string literal or integer (TTD_STR_xxx)
  10. +    if not isinstance(val, (nml.expression.StringLiteral, nml.expression.String, nml.expression.ConstantNumeric)):
  11.          raise generic.ScriptError("Expected a (literal) string", val.pos)
  12.      if isinstance(val, nml.expression.String):
  13.          # Check that the string exists
  14.  

Comments