 |
Castle Paradox
|
| View previous topic :: View next topic |
| Author |
Message |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Sat Mar 01, 2008 11:34 am Post subject: |
|
|
So... what's the problem? Or do you want our resident psychic to field this one? _________________
|
|
| Back to top |
|
 |
JSH357

Joined: 02 Feb 2003 Posts: 1705
|
Posted: Sat Mar 01, 2008 12:01 pm Post subject: |
|
|
| the_dude257 wrote: | i started a new game yesterday so im likely to have tons of problems soon, so if anyone would like to help me constently id be thankful for it.
onto my first problem;
script, door, begin
if, (npc at spot (14,11,2) or, check tag (2))
then,
begin
write map block (14,10,15,1)
write map block (14,9,15,1)
write map block (14,8,15,1)
write map block (14,7,15,1)
write map block (14,6,15,1)
write map block (14,5,15,1)
write map block (14,4,15,1)
write map block (14,3,15,1)
write map block (14,2,18,1)
write map block (15,2,16,1)
write map block (16,2,16,1)
write map block (17,2,9,1))
end |
Looks like an extra parenthesis to me.
It's really a lot cleaner to use then() than then, begin, end IMO. Makes it harder to miss stuff like this.
Last edited by JSH357 on Sat Mar 01, 2008 12:02 pm; edited 1 time in total |
|
| Back to top |
|
 |
Blue Pixel SPY SAPPIN MAH FISH SANDWICH

Joined: 22 Apr 2005 Posts: 621
|
Posted: Sat Mar 01, 2008 12:02 pm Post subject: |
|
|
well, im not quite sure what the problem is, i looked over it and it seems like i did everything fine, but when i try to convert it, it says theres something wrong with the npc at spot code. _________________
 |
|
| Back to top |
|
 |
JSH357

Joined: 02 Feb 2003 Posts: 1705
|
Posted: Sat Mar 01, 2008 12:05 pm Post subject: |
|
|
hm.
I'm not familiar with the way you've done this:
if, (npc at spot (14,11,2) or, check tag (2))
Could the comma after "if" be the problem?
You would also need a comma before "or." |
|
| Back to top |
|
 |
Blue Pixel SPY SAPPIN MAH FISH SANDWICH

Joined: 22 Apr 2005 Posts: 621
|
Posted: Sat Mar 01, 2008 12:37 pm Post subject: |
|
|
the commas dont seem to be the problem, i tryed both of your suggestions and they didnt work. _________________
 |
|
| Back to top |
|
 |
Newbie_Power

Joined: 04 Sep 2006 Posts: 1762
|
Posted: Sat Mar 01, 2008 12:44 pm Post subject: |
|
|
Can you copy & paste the errors you are getting? _________________
TheGiz> Am I the only one who likes to imagine that Elijah Wood's character in Back to the Future 2, the kid at the Wild Gunman machine in the Cafe 80's, is some future descendant of the AVGN? |
|
| Back to top |
|
 |
Blue Pixel SPY SAPPIN MAH FISH SANDWICH

Joined: 22 Apr 2005 Posts: 621
|
Posted: Sat Mar 01, 2008 1:08 pm Post subject: |
|
|
No.
 _________________
 |
|
| Back to top |
|
 |
Newbie_Power

Joined: 04 Sep 2006 Posts: 1762
|
Posted: Sat Mar 01, 2008 1:14 pm Post subject: |
|
|
Here's an idea... Did you get the latest HSPEAK nightly? _________________
TheGiz> Am I the only one who likes to imagine that Elijah Wood's character in Back to the Future 2, the kid at the Wild Gunman machine in the Cafe 80's, is some future descendant of the AVGN? |
|
| Back to top |
|
 |
Blue Pixel SPY SAPPIN MAH FISH SANDWICH

Joined: 22 Apr 2005 Posts: 621
|
Posted: Sat Mar 01, 2008 1:15 pm Post subject: |
|
|
...no. but im using voxhumana, for the record. ill get it now.
edit:still didnt work. _________________
 |
|
| Back to top |
|
 |
Calehay ...yeah. Class B Minstrel

Joined: 07 Jul 2004 Posts: 549
|
Posted: Sat Mar 01, 2008 1:31 pm Post subject: |
|
|
| the_dude257 wrote: | No.
 |
Considering there's only 33 lines here, I can only assume you didn't use:
| Code: | | include, plotscr.hsd |
in your script.
Without plotscr.hsd, the compiler has no idea what any of the commands are. _________________ Calehay |
|
| Back to top |
|
 |
Blue Pixel SPY SAPPIN MAH FISH SANDWICH

Joined: 22 Apr 2005 Posts: 621
|
Posted: Sat Mar 01, 2008 1:43 pm Post subject: |
|
|
hah, that was the problem, now it works. HUGE SUCCESS! thank you, see you next problem (relatively soon) _________________
 |
|
| Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sat Mar 01, 2008 5:01 pm Post subject: |
|
|
Wait, what made you use "npc at spot (14,11,2)"? This asks "what is the reference of the 3rd NPC at 14,11?". Maybe this is what you want, but it seems suspicious.
Since it returns an NPC reference, or zero if there is no NPC, and apparently you want to know whether there are at least 3 NPCs on that tile, you should really write "npc at spot (14,11,2) <> 0", or much better, "npc at spot (14,11,get count) >= 3"
You should remember that "or", "and" and "xor" are bitwise operators. They combines the bits, not the truth values, of their left and right operands. This only does what you think it does for values that are either true or false. You can always get away with this when using "or", but remember that some commands like npcatspot return numbers, not truth values (0 and 1).
| JSH357 wrote: | if, (npc at spot (14,11,2) or, check tag (2))
Could the comma after "if" be the problem?
You would also need a comma before "or." |
Every ( and ) (as well each math operator) has implicit commas around them, and the complier ignores duplicate commas, which is why this is allowed (and also why blank lines are allowed).
If you want to copy text out of a Windows console window, right click on the window, select "Mark" and then drag a box around the text you want and press enter. _________________ "It is so great it is insanely great." |
|
| Back to top |
|
 |
Blue Pixel SPY SAPPIN MAH FISH SANDWICH

Joined: 22 Apr 2005 Posts: 621
|
Posted: Sat Mar 01, 2008 5:27 pm Post subject: |
|
|
hmm, it seems you stumbled apon my second problem. im trying to make it so when npc 2 is at x 14 and y 11 it changes the tiles. i beleave i failed to succeed at doing this. _________________
 |
|
| Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Sat Mar 01, 2008 8:37 pm Post subject: |
|
|
| the_dude257 wrote: | | hmm, it seems you stumbled apon my second problem. im trying to make it so when npc 2 is at x 14 and y 11 it changes the tiles. i beleave i failed to succeed at doing this. |
Try something like
| Code: |
if(NPC ID(NPC at spot(14,11)) == 2) then, begin
|
|
|
| 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
|