|
remus Wanderer
Joined: 06 Jul 2002 Posts: 53 Location: Australia
|
Posted: Wed Jun 23, 2004 9:07 pm
Scripting conversion issues |
Greetings Zmudians, I found an old script and am at present converting it to be tidy and clean under 7.05. The problem I am having is this. The script works seemingly perfect but the code syntax errors on me. Due to my merticulous nature and liking to have code that is clean this is somewhat annoying. The Syntax problems in the alias ffapick are highlighted in red:
ALIAS:FFAPICK
VALUE:
#PICK @ffalist
#IF (@eset = noabort) {#IF (%trigger(allies)) {#T- allies;#T+ ffa_allies;#T+ FFA_manager}
unally all
unenemy all
#VAR ffalist {%replace(@ffalist,'*')}
#DELITEM ffalist {p:Select your allies}
#DELITEM ffalist {Deselect this to cancel.:#VA eset noabort}
#FORALL {@aset} {#delitem ffalist {%i:#ADDITEM aset {%i}}}
#VAR eset %replace(@ffalist,:,|)
#VAR eset %replace(@eset,~})
#VAR eset %replace(@eset, ~{,|)
#VAR eset %dups(@eset)
#VAR eset %delitem("#ADDITEM aset ",@eset)
#IF (@eset) {#FORALL {@eset} {#IF (!%ismember(%i,@enemylist)) {enemy %i}}}
#IF (@aset) {#FORALL {@aset} {#IF (!%ismember(%i,@allylist)) {ally %i}}}}
Now I changed it to this using an alias for #ADDITEM which according to the syntax system is right but according to zmud means Program termination message. I know this is like the electrician guy that joins wires to the lights work but it was worth a try. *Waits patiently for Lightbulb to look at this and laugh*
Value:
#PICK {@ffalist} //added the {}
#IF (@eset = noabort) {
#IF (%trigger( allies)) {
#T- allies
#T+ ffa-allies
#T+ ffa-manager
}
unally all
unenemy all
#VAR ffalist {%replace( @ffalist, '*')}
#DELITEM ffalist {p:Select your allies}
#DELITEM ffalist {Deselect this to cancel.:eset=noabort} //removed #VA
#FORALL {@aset} {#delitem ffalist {%i:addi aset %i}}
} //removed a { before the %i and one after.
#VAR eset %delitem( "addi aset ", @eset) // addi is #additem aliased
#VAR eset %replace( @eset, ~}, "")
#VAR eset %replace( @eset, ~{, |)
#VAR eset %dups( @eset)
#IF (@eset) {#FORALL {@eset} {#IF (!%ismember( %i, @enemylist)) {enemy %i}}}
#IF (@aset) {#FORALL {@aset} {#IF (!%ismember( %i, @allylist)) {ally %i}}} // removed a }
As you can see this is just one alias in a large script. If you think posting the whole script would be some advantage I can do that too just thought that at present its confusing enough without all the connecting lines.
The other problem is that the variable in ffa_allies called enemies gets in its stringlist one clean entry and the rest is all stuck on one line with heaps of extra ( ) ((( things.
Ok also which of this is right:
#IF (%1 != Amylon)
or
#IF (%1=!Amylon) |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Jun 24, 2004 12:15 am |
The syntax checker doesn't expect to find zMUD #COMMANDs inside variables. However, this variable is for a #PICK list, and the commands are appropriate.
Check the syntax yourself. If you think it's correct and the alias works, then ignore the "syntax errors".
Neither is correct. It should be
#IF {"%1" != Amylon) |
|
|
|
|
|
|
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
|
|