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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
sav
Wanderer


Joined: 09 Jan 2006
Posts: 86

PostPosted: Tue Feb 13, 2007 7:57 pm   

Help!
 
#IF ((%1=abcdefg) or (%1=abcdefgh) and (@corpse=1)) {dothis;eat corpse;take coins;a1} {#IF ((%1=abcdefg) or (%1=abcdefgh) and (@corpse=2)) {embalm;take corpse;take coins;a1} {#IF ((%1=abcdefg) or (%1=abcdefgh) and (@corpse=3)) {dothis;embalm;take corpse;take coins;a1} {#IF (@corpse=4) {dothis;eat corpse;1234567;a1} {#IF (@corpse=5) {dothis;bury;1234567;a1} {#IF (@corpse=6) {dothis;a1} {#IF (@corpse=7) {a1} {#IF ((%1=abcdefg) or (%1=abcdefgh) and (@corpse=8)) {dothis;bury;take coins;a1} {#IF ((%1=abcdefg) or (%1=abcdefgh) and (@corpse=9)) {dothis;feed;take coins;a1} {#IF ((%1=abcdefg) or (%1=abcdefgh) and (@corpse=10)) {dothis;abcd;take coins;a1} {#IF ((%1=abcdefg) or (%1=abcdefgh) and (@corpse=11)) {abcd;take coins;a1}}}}}}}}}}}


compatibility report keeps saying 'unmatched braces at row 0 col 146' but i can't find it. can anyone help please? thanks[/quote]
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Tue Feb 13, 2007 8:08 pm   
 
It works fine for me, doesn't show any problems at all.

There's extra logic checking going on though. You're testing #IF %1=abcdefg a lot of times, but if it matches even once then it'll never be checked again so may as well remove it the extra times)
You're also doing 'a1' in every #IF, so may as well just add it at the end
Using #SWITCH and throwing away the extra checks then I think it can be cut down to.

Code:
#SWITCH ((%1=abcdefg) || ((%1=abcdefgh) && (@corpse=1))) {dothis;eat corpse;take coins}
  ((%1=abcdefgh) && (@corpse=2)) {embalm;take corpse;take coins}
  ((%1=abcdefgh) && (@corpse=3)) {dothis;embalm;take corpse;take coins}
  (@corpse=4) {dothis;eat corpse;1234567}
  (@corpse=5) {dothis;bury;1234567}
  (@corpse=6) {dothis}
  ((%1=abcdefgh) && (@corpse=8)) {dothis;bury;take coins}
  ((%1=abcdefgh) && (@corpse=9)) {dothis;feed;take coins}
  ((%1=abcdefgh) && (@corpse=10)) {dothis;abcd;take coins}
  ((%1=abcdefgh) && (@corpse=11)) {abcd;take coins}
a1
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
sav
Wanderer


Joined: 09 Jan 2006
Posts: 86

PostPosted: Tue Feb 13, 2007 9:03 pm   
 
weird, i have 2 aliases, al and aloff. whenever i try to go southeast, i type in se. but instead of going se, my aliases al and aloff go off. i don't even know where to start looking to correct this problem..

anyone know what's going on? lemme know what extra info you need cuz i'm stumped. thanks
Reply with quote
sav
Wanderer


Joined: 09 Jan 2006
Posts: 86

PostPosted: Wed Feb 14, 2007 8:04 am   
 
omfg.. having so many weird problems with cmud..

#IF (%1=@deadman) {#GAG;step}

unmatched braces at row 0 col 23

i just don't get it.. someone help... pleaseeee
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Wed Feb 14, 2007 8:22 am   
 
Compiles just fine for me. It can't be that part of the script that has the problem.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
sav
Wanderer


Joined: 09 Jan 2006
Posts: 86

PostPosted: Wed Feb 14, 2007 8:31 am   
 
this is the trigger
There is no (*) here.

this is the command that's supposed to be executed
#IF (%1=@deadman) {#GAG;step}

i don't get why it compiles for you, but i get unmatched bracers.

and my 'se' triggering 2 aliases that from what i see, have no connection to it at all...

could it be my version of windows?
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Wed Feb 14, 2007 8:48 am   
 
Take a look at this.

"Braces" are the curly brackets {} you use to tell CMUD it's looking at commands - if it thinks they're unmatched, it means there's an odd number of them (so one is open and hasn't been closed, or one's trying to close something that's not open).

It's probably not your windows installation - more likely something's corrupted your .pkg file. Try emailing it to support@zuggsoft.com to have Zugg check if it really is corrupt.
Reply with quote
sav
Wanderer


Joined: 09 Jan 2006
Posts: 86

PostPosted: Wed Feb 14, 2007 10:29 am   
 
i can't find a .pkg file... where is it?
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Wed Feb 14, 2007 11:59 am   
 
Probably in your My Documents\My Games\CMUD\<mud name>\<mud name>.pkg or if you chose differently when installing then Program Files\CMUD\<mud name>\<mud name>.pkg where <mud name> is the name you called the icon in CMUD which is most likely the name of your mud.
_________________
Taz :)
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Wed Feb 14, 2007 12:01 pm   
 
If you open the settings, editor, there's a button on the Package toolbar that opens the Package Properties page. At the bottom of that page is the location of the package.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
sav
Wanderer


Joined: 09 Jan 2006
Posts: 86

PostPosted: Thu Feb 15, 2007 8:49 pm   
 
hmm, ok thanks for the responses so far. say i only wanna transfer my zmud map to cmud, how should i go about doing that?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Feb 15, 2007 10:08 pm   
 
Just make a copy of the map database (zmud character's Session ID here.MDB) and paste it into the CMud directory. Once that's done, open up CMud, open the mapper, and then within the mapper open up the zmud map file you just copied over.

I'm not sure how successful you will be, since the mapper in CMud is the exact same thing code-wise as the one in ZMud. Because it's a ZMud module trying to couple itself to CMud, there's going to be some unavoidable problems.
_________________
EDIT: I didn't like my old signature
Reply with quote
sav
Wanderer


Joined: 09 Jan 2006
Posts: 86

PostPosted: Sat Feb 17, 2007 4:09 pm   
 
thanks for the responses all. i've decided to transfer everything over manually, except the maps.

so i need some help again.


#TRIGGER {mudoutput} {#IF (@rp=1) {rn} {prep @item}}

don't know why. this doesn't work.. i tried entering it through the command line, then i tried it through the editor. doesn't work.. help please. thanks..=)
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Sat Feb 17, 2007 6:07 pm   
 
You'll need to be more specific about what exactly this isn't (or is) doing that you (don't) expect it to. It works fine here just by pasting that code on the command line and creating some variables.
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Sat Feb 17, 2007 6:29 pm   
 
Since nothing seems to be working, yet the syntax is fine in all cases I'd suggest uninstalling CMUD, deleting the CMUD directory then reinstalling it before trying anything new
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
sav
Wanderer


Joined: 09 Jan 2006
Posts: 86

PostPosted: Sun Feb 18, 2007 2:49 pm   
 
sometimes the things i put in don't work and other times they do. the above trigger for example. sometimes it doesn't work, and i restart cmud and it'll work.

something else has stumped me now.

this is my mud hpbar
[Hp:1476/1476|Sp:868/868] [SK:92%|GG:111/111(0)|Q:2(33%)|A:--] [G:0] [En:none]

this is my trigger
~[Hp~:(%d)~/(%d)~|Sp~:(%d)~/(%d)~] ~[SK~:(%d)~%~|GG~:(%d)~/(%d)~((%d)~)~|Q~:(%d)~((%d)~%~)~|A~:(*)~] ~[G~:(%d)~] ~[En~:(%w)~]

i can't seem to capture my hpbar at all. can't find what's wrong either.. can anyone see it? the hpbar is all on 1 line by the way
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Feb 19, 2007 2:36 am   
 
Did you copy and paste it from your mud window? CMud automatically places a $ on the end if your copying of a line included a carriage return, and that's going to mess up your trigger IF the prompt doesn't have a newline (if it doesn't, when you enter a command the newline will be placed after the command echo and thus the trigger never matches).
_________________
EDIT: I didn't like my old signature
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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