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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
edb6377
Magician


Joined: 29 Nov 2005
Posts: 482

PostPosted: Tue Jun 13, 2006 3:04 am   

Periods Yes CMUD hates periods
 
Here is an example of what i have been running into in scripts.

CMUD really hates periods. Aliases triggers doesnt matter it causes the compiler to get mad. THis is just an example for you to look at.

obviouslly the period in #SAY has no bering on anything but it wont compile with it even ~. so when you are debugging and it says things like UNMATCHED BRACKETS.. look for periods. I have had this happen all over the place today

ZMUD VERSION of an alias
Code:

#VARIABLE Found 0
#LOOP 1,%numitems( @StatusElements) {
#IF (%db( %item( @StatusElements, %repeatnum), "ID") = "%1") {#VARIABLE Found %if( @Found = %null, %repeatnum, %concat( %repeatnum, "|", @Found))}}
#IF (@Found <> %null) {
  #FORALL @Found {#DELNITEM StatusElements %repeatnum}
  #SAY Status text ID %1 removed from display list
  recalculate
  } {
  #SAY Unable to find ID %1 in current status elements.
  listtexts
  }


WORKING CMUD VERSION
Code:

#VARIABLE Found 0
#LOOP 1,%numitems( @StatusElements) {
#IF (%db( %item( @StatusElements, %repeatnum), "ID") = "%1") {#VARIABLE Found %if( @Found = %null, %repeatnum, %concat( %repeatnum, "|", @Found))}}
#IF (@Found <> %null) {
  #FORALL @Found {#DELNITEM StatusElements %repeatnum}
  #SAY Status text ID %1 removed from display list
  recalculate
  } {
  #SAY Unable to find ID %1 in current status elements
  listtexts
  }


What i cant figure out is it calls recalculate
heres what happens this is the code for recalculate
Code:

#VARIABLE TempOutput %null
#FORALL @StatusElements {#VARIABLE TempOutput %concat( %expand( @TempOutput, 1), %char( 27), "[", %repeatnum.Row, "~;", %repeatnum.Column, "f", %expand( %repeatnum.Content, 1))}
#EXECUTE %concat( "#STW ", %char( 34), %expand( @TempOutput, 1), %char( 34))


I type in the remtext name it should remove it but heres what i get

Code:

Currently defined positional status window texts are:
1:
ID: name
Row: 1
Column: 4
Content: Name: Tamlin

Status text ID name removed from display list
#VARIABLE TempOutput %null
#FORALL @StatusElements {#VARIABLE TempOutput %concat( %expand( @TempOutput, 1), %char( 27), "[", %repeatnum.Row, "~;", %repeatnum.Column, "f", %expand( %repeatnum.Content, 1))}
#EXECUTE %concat( "#STW ", %char( 34), %expand( @TempOutput, 1), %char( 34))
I am unable to comprehend what you ask.

[SAFE]<1930hp 1956sp 1580st> For a list of acceptable commands, type ?.

[SAFE]<1930hp 1956sp 1580st> I don't see what you are getting at.

[SAFE]<1930hp 1956sp 1580st> Currently defined positional status window texts are:
1:
ID: name
Row: 1
Column: 4
Content: Name: Tamlin


Anyone have ideas why its not running the alias but sending the text instead?
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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