GZDoom won't accept this fontdefs file!

Need help running G/Q/ZDoom/ECWolf/Zandronum/3DGE? Did your computer break? Ask here.

Moderator: GZDoom Developers

James Flasch
Posts: 36
Joined: Tue Dec 13, 2016 5:32 pm

GZDoom won't accept this fontdefs file!

Post by James Flasch »

Why does GZDoom think this fontdefs file has 69 lines when it only has 68???????????????????????????? (And why is it thinking that now when it didn't think that last night?)

Code: Select all

// SmallFont
SMALLFNT
{
  ! FONTA01
  " FONTA02
  # FONTA03
  $ FONTA04
  % FONTA05
  & FONTA06
  ' FONTA07
  ( FONTA08
  ) FONTA09
  * FONTA10
  + FONTA11
  ' FONTA12
  - FONTA13
  . FONTA14
  / FONTA15
  0 FONTA16
  1 FONTA17
  2 FONTA18
  3 FONTA19
  4 FONTA20
  5 FONTA21
  6 FONTA22
  7 FONTA23
  8 FONTA24
  9 FONTA25
  : FONTA26
  ; FONTA27
  < FONTA28
  = FONTA29
  > FONTA30
  ? FONTA31
  @ FONTA32
  A FONTA33
  B FONTA34
  C FONTA35
  D FONTA36
  E FONTA37
  F FONTA38
  G FONTA39
  H FONTA40
  I FONTA41
  J FONTA42
  K FONTA43
  L FONTA44
  M FONTA45
  N FONTA46
  0 FONTA47
  P FONTA48
  Q FONTA49
  R FONTA50
  S FONTA51
  T FONTA52
  U FONTA53
  V FONTA54
  W FONTA55
  X FONTA56
  Y FONTA57
  Z FONTA58
  [ FONTA59
  \ FONTA60
  ] FONTA61
  ^ FONTA62
  _ FONTA63    
  NOTRANSLATION 109	// don't touch the shadow color!
}
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47995
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: GZDoom won't accept this fontdefs file!

Post by Graf Zahl »

Your problem is the quotation mark. Since this is used to start a string literal it needs to be escaped, i.e. "\"". This is a limitation of the parser and cannot be changed.
James Flasch
Posts: 36
Joined: Tue Dec 13, 2016 5:32 pm

Re: GZDoom won't accept this fontdefs file!

Post by James Flasch »

tried "\"" and "/"" and neiither worked so until I figure out what does I'll have to comment out those lines.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47995
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: GZDoom won't accept this fontdefs file!

Post by Graf Zahl »

What does "neither worked" mean?
James Flasch
Posts: 36
Joined: Tue Dec 13, 2016 5:32 pm

Re: GZDoom won't accept this fontdefs file!

Post by James Flasch »

That I placed a slash before the quote marks (and then a backslash) and still got the same error message as before about an unexpected end of file on a 69th line that doesn't exist.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47995
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: GZDoom won't accept this fontdefs file!

Post by Graf Zahl »

That essentially means you have an unterminated string constant. Can you paste your entire code with the '\' present? The normal forward slash / won't do anything at all here - this is not a path separator,
James Flasch
Posts: 36
Joined: Tue Dec 13, 2016 5:32 pm

Re: GZDoom won't accept this fontdefs file!

Post by James Flasch »

Here it is.

Code: Select all

// SmallFont
SMALLFNT
{
  ! FONTA01
  \" FONTA02
  # FONTA03
  $ FONTA04
  % FONTA05
  & FONTA06
  \' FONTA07
  ( FONTA08
  ) FONTA09
  * FONTA10
  + FONTA11
  ,  FONTA12
  - FONTA13
  . FONTA14
  / FONTA15
  0 FONTA16
  1 FONTA17
  2 FONTA18
  3 FONTA19
  4 FONTA20
  5 FONTA21
  6 FONTA22
  7 FONTA23
  8 FONTA24
  9 FONTA25
  : FONTA26
  ; FONTA27
  < FONTA28
  = FONTA29
  > FONTA30
  ? FONTA31
  @ FONTA32
  A FONTA33
  B FONTA34
  C FONTA35
  D FONTA36
  E FONTA37
  F FONTA38
  G FONTA39
  H FONTA40
  I FONTA41
  J FONTA42
  K FONTA43
  L FONTA44
  M FONTA45
  N FONTA46
  0 FONTA47
  P FONTA48
  Q FONTA49
  R FONTA50
  S FONTA51
  T FONTA52
  U FONTA53
  V FONTA54
  W FONTA55
  X FONTA56
  Y FONTA57
  Z FONTA58
  [ FONTA59
  \ FONTA60
  ] FONTA61
  ^ FONTA62
  _ FONTA63   
  NOTRANSLATION 109   // don't touch the shadow color!
}
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47995
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: GZDoom won't accept this fontdefs file!

Post by Graf Zahl »

Yeah, that's not correct. I said "\"", not \". you can use escapes only in quoted strings.
James Flasch
Posts: 36
Joined: Tue Dec 13, 2016 5:32 pm

Re: GZDoom won't accept this fontdefs file!

Post by James Flasch »

Now have this, STILL giving me that error message!

Code: Select all

// SmallFont
SMALLFNT
{
    ! FONTA01
 '\"' FONTA02
    # FONTA03
    $ FONTA04
    % FONTA05
    & FONTA06
 "\'" FONTA07
    ( FONTA08
    ) FONTA09
    * FONTA10
    + FONTA11
    , FONTA12
    - FONTA13
    . FONTA14
    / FONTA15
    0 FONTA16
    1 FONTA17
    2 FONTA18
    3 FONTA19
    4 FONTA20
    5 FONTA21
    6 FONTA22
    7 FONTA23
    8 FONTA24
    9 FONTA25
    : FONTA26
    ; FONTA27
    < FONTA28
    = FONTA29
    > FONTA30
    ? FONTA31
    @ FONTA32
    A FONTA33
    B FONTA34
    C FONTA35
    D FONTA36
    E FONTA37
    F FONTA38
    G FONTA39
    H FONTA40
    I FONTA41
    J FONTA42
    K FONTA43
    L FONTA44
    M FONTA45
    N FONTA46
    O FONTA47
    P FONTA48
    Q FONTA49
    R FONTA50
    S FONTA51
    T FONTA52
    U FONTA53
    V FONTA54
    W FONTA55
    X FONTA56
    Y FONTA57
    Z FONTA58
    [ FONTA59
    \ FONTA60
    ] FONTA61
    ^ FONTA62
    _ FONTA63    
  NO
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47995
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: GZDoom won't accept this fontdefs file!

Post by Graf Zahl »

Because you used single quotes. I said "\""
James Flasch
Posts: 36
Joined: Tue Dec 13, 2016 5:32 pm

Re: GZDoom won't accept this fontdefs file!

Post by James Flasch »

Works now.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47995
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: GZDoom won't accept this fontdefs file!

Post by Graf Zahl »

Works for me when I take your file, replace the single quotes and the missing closing brace at the end.

Code: Select all

SMALLFNT
{
    ! FONTA01
 "\"" FONTA02
    # FONTA03
    $ FONTA04
    % FONTA05
    & FONTA06
 "\'" FONTA07
    ( FONTA08
    ) FONTA09
    * FONTA10
    + FONTA11
    , FONTA12
    - FONTA13
    . FONTA14
    / FONTA15
    0 FONTA16
    1 FONTA17
    2 FONTA18
    3 FONTA19
    4 FONTA20
    5 FONTA21
    6 FONTA22
    7 FONTA23
    8 FONTA24
    9 FONTA25
    : FONTA26
    ; FONTA27
    < FONTA28
    = FONTA29
    > FONTA30
    ? FONTA31
    @ FONTA32
    A FONTA33
    B FONTA34
    C FONTA35
    D FONTA36
    E FONTA37
    F FONTA38
    G FONTA39
    H FONTA40
    I FONTA41
    J FONTA42
    K FONTA43
    L FONTA44
    M FONTA45
    N FONTA46
    O FONTA47
    P FONTA48
    Q FONTA49
    R FONTA50
    S FONTA51
    T FONTA52
    U FONTA53
    V FONTA54
    W FONTA55
    X FONTA56
    Y FONTA57
    Z FONTA58
    [ FONTA59
    \ FONTA60
    ] FONTA61
    ^ FONTA62
    _ FONTA63    
}

Return to “Technical Issues”