 |
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
Eggheadcheesybird Peshwari Naan.

Joined: 03 Apr 2008 Posts: 2 Location: Hertfordshire
|
Posted: Thu Apr 03, 2008 12:01 pm Post subject: What's wrong with my script? |
|
|
Complete newbie, just started playing with this program a few days ago:
Code: | include, plotscr.hsd
include, cw.hsi
define script (1,castlegroundsbattle,none)
define script (2,castlegroundsentrance,none)
script,castlegroundsbattle,begin
variable(fight)
if(checktag(8)==off) then (show text box(2),set tag(8,on),setvariable(fight,random(0,2))
else (setvariable(fight,random(0,5))
if((fight>>2)&&(checktag(9)==off)) then (show text box(3))
fight formation(fight)
end
script,castlegroundsentrance,begin
if (checktag(5)==OFF) then (show text box(22),set tag(5,ON))
end |
It's probably something really obvious but I've been over it again and again and I just can't see it.
The error when I try to compile is "Perhaps castlegroundsbattle has an extra begin"... I couldn't find one, though. |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Thu Apr 03, 2008 12:35 pm Post subject: |
|
|
Mismatched parentheses. The line should read:
Quote: | if(checktag(8)==off) then (show text box(2),set tag(8,on),setvariable(fight,random(0,2)))
else (setvariable(fight,random(0,5))) |
It'd be easier for you to work with if you made it look like this:
Code: | script,castlegroundsbattle,begin
variable(fight)
if(checktag(8)==off) then
(
show text box(2)
set tag(8,on)
setvariable(fight,random(0,2))
)
else
(
setvariable(fight,random(0,5))
)
if((fight>>2)&&(checktag(9)==off)) then (show text box(3))
fight formation(fight)
end
script,castlegroundsentrance,begin
if (checktag(5)==OFF) then
(
show text box(22)
set tag(5,ON)
)
end |
Hope that helps! _________________
|
|
Back to top |
|
 |
Eggheadcheesybird Peshwari Naan.

Joined: 03 Apr 2008 Posts: 2 Location: Hertfordshire
|
Posted: Thu Apr 03, 2008 2:39 pm Post subject: |
|
|
Ach. And I thought I'd tried that too.
This serves me right for trying to be the big fancyman with iddy little bits of code all squashed together in there with all the things and the horror and terrible, terrible affliction never did fully regain the use of his left toe you know blaaaarrrrcgghhhe.
So, yes. Thank you, it's fine now. _________________
 |
|
Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|