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
groundzero2010
Novice


Joined: 30 Sep 2004
Posts: 47
Location: Arkansas

PostPosted: Mon Aug 03, 2009 3:32 am   

Need some help with compatiblity report debugging
 
They all show illegal tokens but don't know why.

1.

Trigger You need to visit a master to learn more about (*)!
Does not compile : illegal token: = @master11 at row 12 col 9

Code:
<trigger priority="2780" id="278">
  <pattern>You need to visit a master to learn more about (*)!</pattern>
  <value>@master12 = @master11
@master11 = @master10
@master10 = @master9
@master9 = @master8
@master8 = @master7
@master7 = @master6
@master6 = @master5
@master5 = @master4
@master4 = @master3
@master3 = @master2
@master2 = @master1
@master1 = @master0
@master0 = %1 %time( c)</value>
</trigger>



2.

Trigger Your knowledge of (*) increases!
Does not compile : illegal token: = @last11 at row 12 col 7

Code:

<trigger priority="2770" id="277">
  <pattern>Your knowledge of (*) increases!</pattern>
  <value>@last12 = @last11
@last11 = @last10
@last10 = @last9
@last9 = @last8
@last8 = @last7
@last7 = @last6
@last6 = @last5
@last5 = @last4
@last4 = @last3
@last3 = @last2
@last2 = @last1
@last1 = @last0
@last0 = %1 %time( c)</value>
</trigger>


3.

Trigger {You don't have enough mana to mix that potion!|You haven't the
Does not compile : illegal token: at row 0 col 110

Code:

<trigger priority="2960" id="296">
  <pattern>{You don't have enough mana to mix that potion!|You haven't the energy to cast that spell!}</pattern>
  <value>#beep;;chant;;#wa 10000;;st;;#IF (@char.maxhp = @char.hp) {brew bot @brew} {#say Something went VERY wrong!!}</value>
</trigger>
Reply with quote
groundzero2010
Novice


Joined: 30 Sep 2004
Posts: 47
Location: Arkansas

PostPosted: Mon Aug 03, 2009 3:39 am   
 
Okay..I found the solution to 1. and 2. (i believe) I just put a ~ in front of = .

Although I'm still stumped on 3. I tried a ~= for a fix but that was a no go.
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Mon Aug 03, 2009 3:49 am   
 
Actually...

Unless you're setting the item in the variables to whatever, then you should never use @variable. Here's what I mean.

#VAR a b
#VAR b c

If I wanted to change variable a to hold the contents that variable b does, then I'd do:

a=@b

Otherwise, using:
@a=@b

CMUD would assume you're wanting to put the contents of variable a (in this case, b) as to what the contents of variable b hold. If you truly want to do it this way, then I believe the proper syntax is:

@{a}=@b

though I could be wrong. Your best bet for the first two is not to change it to ~=, but to last11=@last10, etc.

As for number 3... why are you using ;; as command separators? Generally, that means comment out the line, though // would be better. Change all the ;; to ;, and you should be okay. And do you really want to wait 10 seconds before it does anything? #WA 10000 makes you wait for 10 seconds. If you're wanting 1 second, then make it #WA 1000.

Charneus
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Mon Aug 03, 2009 7:00 am   
 
This.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
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