Jump to content

Photo

Scripts errors


  • Please log in to reply
10 replies to this topic

#1 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 27 October 2016 - 04:41 PM

Hi i need your help (again) I was copy the good script exemple for the signpost and for make peoples speak but the problem i was make the FFC script for that (or another script for something else) and it's always make that error 
''Error
 Unable to parse instruction 1 from script Sign.txt (my script)
The error was: invalid instruction! 
The command was (script) (Signpost{,) ''
I really don't get it i was try anything but the result is the same. How i can fix this error ? there is something i miss and i should no add ? 
 



#2 cavthena

cavthena

    Apprentice

  • Members
  • Real Name:Clayton
  • Location:I wish I knew

Posted 27 October 2016 - 05:26 PM

Try saving the file as a .z or .zh and not a .txt

Your trying to compile a txt file.

#3 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 27 October 2016 - 05:34 PM

ah ok but how ? i want use FFC script and i must have the .txt files


Edited by Cedric, 27 October 2016 - 05:36 PM.


#4 Saffith

Saffith

    IPv7 user

  • Members

Posted 27 October 2016 - 05:39 PM

You're importing the script as ASM. Go to Quest -> Scripts -> Compile ZScript...
If you want to import the file, it needs to be named .z instead of .txt to show up in the file dialog. You don't have to change anything else but the name.

#5 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 27 October 2016 - 05:40 PM

ok



#6 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 27 October 2016 - 06:11 PM

Well i trying to do what you said me to do but i don't know if it's good or it's a problem...
i was copy the script in the Compile ZScript but i have a strange error like 
''Pass 1: Parsing
​Line 51: Syntax Error, unexpected $end, expecting rbrace, on token
Fatal error P00: (or oo) can't open or parse input file!
-- Press a key-- 
(i try to combine it with the shutter script)
and i get this.

''Error
There were compile errors, 
Compilation halted.''
What i should do ? i'm sorry for many questions i don't ever know the scripts and his functions.



#7 Saffith

Saffith

    IPv7 user

  • Members

Posted 27 October 2016 - 09:01 PM

That one's an actual script error. Sounds like it ends prematurely, but if you were trying to combine two, you might have made a mistake in doing that. Could you post the script?

#8 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 27 October 2016 - 09:13 PM

i'll do it later ^^'



#9 Anthus

Anthus

    Lord of Liquids

  • Members
  • Location:Ohio

Posted 27 October 2016 - 11:37 PM

ah ok but how ? i want use FFC script and i must have the .txt files


I would try importing only the signpost script at first. Until you become more comfortable with combining scripts, this will help you learn.

ZC cannot read ".txt" files, so simply rename it so it ends in ".z".

#10 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 28 October 2016 - 11:34 AM

Ok this is the script i was did in my Z-Quest. The shutters script was already inclued

import "std.zh"
import "shuttercontrol.z"

global script shutters {
     void run() {
    while(true) {
           if(checkAAndB()) {
           shutterFlag = true;
           }
          shutterControl();
          updatePrev();
          Waitframe();
     }
    }
}

bool checkAAndB()  {
       if(Link->InputA && Link->InputB) {
      return true;
      }
      return false;
}

ffc script Signpost{
    void run(int m,int input){
        int loc = ComboAt(this->X,this->Y);
        while(true){
            while(!AgainstComboBase(loc) || !SelectPressInput(input)) Waitframe();
            SetInput(input,false);
            Screen->Message(m);
            Waitframe();
        }
    }
    bool AgainstComboBase(int loc){
        return Link->Z == 0 && (Link->Dir == DIR_UP && Link->Y == ComboY(loc)+8 && Abs(Link->X-ComboX(loc)) < 8);
    }
}


//!!These functions should only be included in your script file once!!
bool SelectPressInput(int input){
    if(input == 0) return Link->PressA;
    else if(input == 1) return Link->PressB;
    else if(input == 2) return Link->PressL;
    else if(input == 3) return Link->PressR;
}
void SetInput(int input, bool state){
    if(input == 0) Link->InputA = state;
    else if(input == 1) Link->InputB = state;
    else if(input == 2) Link->InputL = state;
    else if(input == 3) Link->InputR = state;
}

Edited by Cedric, 28 October 2016 - 11:36 AM.


#11 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 28 October 2016 - 08:26 PM

i no really know the problem except i think the shutters script shouldn't be here because this script block another scripts but it's the only scripts i can use without problem except if i get the correct gbc oracles zelda series style shutters scripts.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users