Forum

> > Stranded II > Scripts > Trouble referring to external script.
Forums overviewStranded II overview Scripts overviewLog in to reply

English Trouble referring to external script.

2 replies
To the start Previous 1 Next To the start

old Trouble referring to external script.

WaspIV
User Off Offline

Quote
Hey all,

I'm trying to create a building that is interactive, similar to the AI characters in the random maps.

I've created a seperate .s2s file with the information needed, but I can't get the script in objects_buildings.inf to properly refer to the external script.
I did some study on similar scripts, and it appears like this script should work;
troublesome script has written
on:use
dialogue "blacksmith", "sys/scripts/blacksmith.s2s","blacksmith";


But, every time I try to use the Blacksmith building though, I get this error;
IMG:https://i50.tinypic.com/302p4rp.jpg


The external script I'm referring to is quite simple at the moment.
blacksmith.s2s has written
//~blacksmith
page=start
title=Blacksmith
text=start
Ah, a blacksmithy. Now I can make metal tools!
text=end
button=action:close,No, thanks!

So, I very much doubt that the error is caused by the external script.

Does anyone know what's going sour in this script?

old Re: Trouble referring to external script.

Hurri04
Super User Off Offline

Quote
1
2
3
on:use {
	dialogue "start", "sys/scripts/blacksmith.s2s";
}
try that.
you forgot the brackets and you referred to the wrong start page.

and forget the 3rd parameter, it's not that useful for dialogues as you work with pages here rather than with passages. just put all dialogue code related to your blacksmith stuff into that one blacksmith.s2s file and dont use it for anything else.
1
2
3
4
5
6
page=start
title=Blacksmith
text=start
Ah, a blacksmithy. Now I can make metal tools!
text=end
button=action:close,No, thanks!

also use "code" tags next time
To the start Previous 1 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview