PDA

View Full Version : it wont let me compile scripts.



dingo131
04-09-2008, 11:00 PM
i import the script and it acts like its gonna but then it says "there were compile errors. compilation halted." help plz!

Master Maniac
04-09-2008, 11:16 PM
that means somethings wrong with the script.

did you write it? if not what script is it? maybe ill find whats wrong and fix it so it can work.

also, is it a ZScript type of script or ZASM?

it makes a difference in compiling.

the compiler usually tells you whats wrong with it, so i use that as a correction tool. what does it say when you try to compile it? is that the only message you get?

...also i think this goes in script general discussion/help...

someone should make a sticky about this. if the mods let me post it here (so n00bs can find it easier and stop making threads like this lol) ill volunteer for it.

dingo131
04-09-2008, 11:20 PM
i didn't write it. its a script for letting link be able to read a sign post.

Master Maniac
04-09-2008, 11:23 PM
ok... do you know the difference between ZScript and ZASM?

ZASM is written in all caps.

ZScript isnt.

have you looked at it? after you do tell me which one it is and ill tell you where to go from there.

dingo131
04-09-2008, 11:24 PM
its zscript

Master Maniac
04-09-2008, 11:32 PM
ok heres how to set this script up then.

save the file with an extension of .z
example,

right:
signpost.z

wrong:
signpost.z.txt

anything with .txt or anything like that will be wrong.

so next,

go to the editor and follow this CAREFULLY!! this means dont talk to strangers and NO bathroom breaks :tongue:

Tools>Scripts>Compile Zscript
now click "import" and select your file.
then click "compile"
if the script is ok and has no errors, you will see a message (i dont know exactly what it says though)
after the message a box will pop up. here you add your script to the list.

there are 3 tabs at the top. FFC Global and Item. under one of those 3 is your signpost script. i think a signpost would be in the FFC tab

find it, highlight it and click the "<<" button

there you go!

now using the script might be a little harder to explain.

EDIT:lol i like being helpful XD

dingo131
04-10-2008, 12:18 AM
its still saying the same thing.

Gleeok
04-10-2008, 12:20 AM
What were the errors?

Do you have the line "import std.zh" in the .z file?

dingo131
04-10-2008, 12:34 AM
i do have it. the error is "line 9: error T28: that pointer type does not have a function message"

Gleeok
04-10-2008, 12:53 AM
Look in line 9. You should see something like this:


Screen->Message();


if Message is spelled with a lowercase "M" it's a typo and just change it.

If that doesn't work can you post the script?

dingo131
04-10-2008, 01:13 AM
import"std.zh"
ffc script sign {
void run(int m) {
while(true) {
while(Link->X < this->X - 8 || Link->X > this->X + 24 || Link->Y < this->Y || Link->Y > this->Y + 24 || Link->Dir != DIR_UP || !Link->InputA) {
Waitframe();
}
Link->InputA = false;
Screen->Message();

while(Link->X >= this->X - 8 && Link->X <= this->X + 24 && Link->Y >= this->Y && Link->Y <= this->Y + 24 && Link->Dir == DIR_UP) {
Waitframe();
}

Screen->Message(0);
}
}
}

Gleeok
04-10-2008, 01:40 AM
import"std.zh"
ffc script sign {
void run(int m) {
while(true) {
while(Link->X < this->X - 8 || Link->X > this->X + 24 || Link->Y < this->Y || Link->Y > this->Y + 24 || Link->Dir != DIR_UP || !Link->InputA) {
Waitframe();
}
Link->InputA = false;
Screen->Message(m);

while(Link->X >= this->X - 8 && Link->X <= this->X + 24 && Link->Y >= this->Y && Link->Y <= this->Y + 24 && Link->Dir == DIR_UP) {
Waitframe();
}

Screen->Message(0);
}
}
}

So it compiles now?

dingo131
04-10-2008, 08:24 PM
no it doesn't

Master Maniac
04-10-2008, 08:48 PM
import"std.zh"
ffc script sign {
void run(int m) {
while(true) {
while(Link->X < this->X - 8 || Link->X > this->X + 24 || Link->Y < this->Y || Link->Y > this->Y + 24 || Link->Dir != DIR_UP || !Link->InputA) {
Waitframe();
}
Link->InputA = false;
Screen->Message();

while(Link->X >= this->X - 8 && Link->X <= this->X + 24 && Link->Y >= this->Y && Link->Y <= this->Y + 24 && Link->Dir == DIR_UP) {
Waitframe();
}

Screen->Message(0);
}
}
}

thats odd...

it compiled just fine for me. i fail to understand this.

try compiling THIS that you posted. copy and paste it to a new document and save it as signpost.z under the all files type.

then try it. it works fine for me... if youre still having issues then im not sure what to do.

Joe123
04-10-2008, 08:50 PM
Come on guys, he's got undeclared constants in that script.


At the top of your script file, copy in this:

import "std.zh"

It needs to be at the top of all script files to load in some number constants that the system uses.
The script was referencing them, but it didn't know where they were.

Make sure you keep all your scripts in the same file too, that's quite important.

EDIT: Oops, you put it in there already.
Missed that, sorry.


import "std.zh"

ffc script signpost{
void run(int m){
while(true){
while(Link->X < this->X - 8 || Link->X > this->X + 24 || Link->Y < this->Y || Link->Y > this->Y + 24 || Link->Dir != DIR_UP || !Link->InputL || Link->Z != 0){
Waitframe();
}
Link->InputL = false;
Screen->Message(m);
while(Link->X >= this->X - 8 && Link->X <= this->X + 24 && Link->Y >= this->Y && Link->Y <= this->Y + 24 && Link->Dir == DIR_UP){
Waitframe();
}
Screen->Message(0);
}
}
}
Try that.

dingo131
04-10-2008, 09:09 PM
nope still nothing. in fact it won't compile any scripts.

bobrocks95
04-10-2008, 09:22 PM
Is the error message still the same? What version are you using?

dingo131
04-10-2008, 09:25 PM
the message for every script? im using either 2.5 or 2.11 idk

Master Maniac
04-10-2008, 09:30 PM
the message for every script? im using either 2.5 or 2.11 idk

he means what build. im using 758...i think it is...?

whatever the latest build you downloaded from shardstorm is.

EDIT: also my scripts are in the same file but the "std.zh" is in a different one and they all work just fine for me.

dingo131
04-10-2008, 09:48 PM
how do i find out what build it is?

and what do you mean by the whole import std.zh thing?

The_Amaster
04-10-2008, 09:52 PM
At the very top of the script just type in "import std.zh"

When did you download it?

dingo131
04-10-2008, 10:07 PM
about a week ago

Zelda_Warrior
04-10-2008, 10:34 PM
Insert the line :

import "std.zh"

at the top of the script and then see if it works.. That's what they're talking about

You might want to download the newest version at http://www.shardstorm.com/ (Version 777?)

Because I think there was some messed up versions a bit ago.

dingo131
04-10-2008, 10:47 PM
k i downloaded it and got the script compiled now how do i use it?

bobrocks95
04-11-2008, 05:58 PM
I predicted this question would come. Where did you find the script?

dingo131
04-12-2008, 03:29 PM
http://zctut.com/signpost.php

bobrocks95
04-12-2008, 04:29 PM
That's... Sad. Not to be mean or anything, but that site has all the information you would need to get that specific script working, you'd just have to actually look.
Try this (http://zctut.com/ffcscript.php) page on that same site.