Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Yrael
Newbie


Joined: 26 May 2007
Posts: 7

PostPosted: Sat May 26, 2007 5:54 am   

What am I doing wrong?
 
Just trying to find out what I'm doing wrong here, as those I've talked to don't see a problem. It's an alias,

Code:
#if (@combopart=0) {
  hexcheckon
  draw hex anorexia
  #alarm 1.5 {hexcheckoff}
  #if (@hexdrawn) {
    @combopart=1
    @hexdrawn=0
    }
  }{
  hexcheckon
  dh stupidity
  #alarm 1.5 {hexcheckoff}
  #if (@hexdrawn) {
    @combopart=0
    @hexdrawn=0
    }
  }


that produces this
Code:

{hexcheckon;draw hex anorexia;#alarm 1.5 {hexcheckoff};#if (0) {0=1}}{hexcheckon;dh stupidity;#alarm 1.5 {hexcheckoff};#if (0) {0=0}}


as an attempted input rather than drawing the hex ingame. HExcheckon and hexcheckoff are just methods of enabling a trigger that checks if the hex was drawn or not, which then sets hexdrawn to one. Any idea why it produces that sring as input?[/code]
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sat May 26, 2007 6:35 am   
 
You're missing a space between the closing brace of the true-command and the opening brace of the false-command of the root #if. Try this:

Code:
#if (@combopart=0) {
  hexcheckon
  draw hex anorexia
  #alarm 1.5 {hexcheckoff}
  #if (@hexdrawn) {
    @combopart=1
    @hexdrawn=0
    }
  } {
  hexcheckon
  dh stupidity
  #alarm 1.5 {hexcheckoff}
  #if (@hexdrawn) {
    @combopart=0
    @hexdrawn=0
    }
  }


Spaces are very important in zScript, make sure you get the ones that're needed in the right places.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Yrael
Newbie


Joined: 26 May 2007
Posts: 7

PostPosted: Sat May 26, 2007 6:48 am   
 
Thbank you, that stops the entire output, but then this:


draw hex anorexia

You trace glyphs in the air, and they begin to glow ominously.
2578h, 3785m, 2779e, 10p, 11790en, 15580w xk-

You have recovered equilibrium.
2578h, 3785m, 2779e, 10p, 11790en, 15580w exk-
draw hex anorexia
0=1
1=0

on the second draw. Any ideas?
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Sat May 26, 2007 5:16 pm   
 
When you are defining the variables you don't use the '@' symbol unless you doing indirect referencing.

So you want

combopart=1 instead of @combopart=1. Similarly for the others you want

hexdrawn=0
combopart=0
_________________
Asati di tempari!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot 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

© 2009 Zugg Software. Hosted by Wolfpaw.net