Jump to content

Photo

Can't Compile a Tango Script (I use \ instead of / in my code


  • Please log in to reply
3 replies to this topic

#1 LikeLike888

LikeLike888

    Spicy food lover!!

  • Members
  • Real Name:Jason
  • Location:North America

Posted 14 June 2018 - 07:08 PM

Here is the error

PASS 1: PARSING
PASS 2: PREPROCESSING
CAN'T OPEN INPUT FILE
TMP, LINE 11: ERROR P01 : FAILURE TO PARSE IMPORTED FILE C:/USERS/SPRIT/DESKTOP/JASON'S THINGS/ZELDA CLASSIC 2.5 STUFF/S247_TANGOZH/DEMOTANGODEMO/COMMON.ZH.
 
-- PRESS A KEY --

 

 

 

Here is my exact FFC script that has up above error

 
import "std.zh"
import "C:\Users\sprit\Desktop\Jason's Things\Zelda Classic 2.5 Stuff\Zelda Classic\s247_tangozh\demotangoDemo\tango.zh"
import "C:\Users\sprit\Desktop\Jason's Things\Zelda Classic 2.5 Stuff\Zelda Classic\s247_tangozh\demotangoDemo\font\LttPOutline.zh"
import "C:\Users\sprit\Desktop\Jason's Things\Zelda Classic 2.5 Stuff\Zelda Classic\s247_tangozh\demotangoDemo\font\OracleExtended.zh"
import "C:\Users\sprit\Desktop\Jason's Things\Zelda Classic 2.5 Stuff\Zelda Classic\s247_tangozh\demotangoDemo\font\Japanese.zh"
import "C:\Users\sprit\Desktop\Jason's Things\Zelda Classic 2.5 Stuff\Zelda Classic\s247_tangozh\demotangoDemo\font\SmallExtended.zh"
import "C:\Users\sprit\Desktop\Jason's Things\Zelda Classic 2.5 Stuff\Zelda Classic\s247_tangozh\demotangoDemo\styles.zh"
import "C:\Users\sprit\Desktop\Jason's Things\Zelda Classic 2.5 Stuff\Zelda Classic\s247_tangozh\demotangoDemo\common.zh"
// Shows a message when Link talks to it.
//
// This is a minimal usage example. It's also used to show messages that
// demonstrate features that don't require any additional script support.
ffc script NPC
{
    void run(int message)
    {
        while(true)
        {
            if(StartTalking(this))
            {
                // Display the assigned message
                int slot=ShowMessage(message, TANGO_SLOT_NORMAL, STYLE_PLAIN,
                  32, 32);
               
                // If the message was displayed successfully...
                if(slot!=TANGO_INVALID)
                {
                    // Wait for it to be closed
                    while(Tango_SlotIsActive(slot))
                        Waitframe();
                }
               
                StopTalking();
            }
           
            Waitframe();
        }
    }
}

 

 

 

How do I edit up above code so that I will have the ffc script compile error free please? Thank you ;)



#2 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 15 June 2018 - 02:47 AM

'\' Backslash is an escape character so your import string is not a valid path or filename. Fix by using forward ('/') slashes.


In the future when windows does something stupid (read: windows does anything) you should contact Microsoft Support here: https://support.microsoft.com/en-us
Tell them Gleeok sent you. :)

[edit] Actually, I can't remember what zc does there...

#3 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 15 June 2018 - 03:44 AM

IDR how well absolute paths work, but they can use a forward slash on all filesystems.

Backslashes in import directives, AFAIR, are converted into forward slashes @Gleeok. I'd need to check, but if you look at the error, the path has been converted. :D

Spaces in path names may cause issues. That is what I'm sensing as the cause here.

ZQuest can't find the file using the specified path.

Why do you need an absolute path? A relative path, eg.:

"./tango_scripts/scriptname.zh"

..is what I'd advise, as if you move your ZC path, that won't be as likely to break.


Try formatting your include paths like this:

import "s247_tangozh/demotangoDemo/font/OracleExtended.zh"
Note that Tango.zh has some rather extensive set-up requirements, and global script usage. I'd advise getting used to ZScript, and how to set up your active script, prior to using packages like this.

Tango.zh also uses a global Init script by default, unless that has changed.

#4 Saffith

Saffith

    IPv7 user

  • ZC Developers

Posted 16 June 2018 - 01:32 PM

Assuming you just extracted everything from the zip file as-is, the directory is wrong. It should be demo\tangoDemo, not demotangoDemo.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users