|
psm Novice
Joined: 19 Jan 2002 Posts: 34 Location: Austria
|
Posted: Sun Feb 03, 2002 11:22 am
could some pro check for bugs? |
I found some scripts, that i would like to use, but when i imported them, i realized, that there is some syntax errors, so maybe could tell what's wrong with it?
i post the whole script and color the area it shows as syntax error red.
#VAR dots {%rightback( %repeat( ".", )10, )}
#ALIAS bounty {DoSort;#VAR sortedList %sort( @slist, 1);#say %1 Most Wanted List;#LOOP 1,%1 {#SAY %left( %word( %item( @sortedList, %i), 2, "^") %repeat( ".", 15), 14)@dots( %number( %word( %item( @sortedList, %i), 1, "^")), 15)%number( %word( %item( @sortedList, %i), 1, "^"))}} "-"
#ALIAS DoSort {#VAR slist {};#LOOP 1,%numitems( @criminals) {#ADDITEM slist %right( %eval( %item( @criminal_bounty, %i)+100000), 1)"^"%item( @criminals, %i)}} "-"
#ALIAS clearbounty {#unvar slist;#unvar sortedList;#unvar criminals;#unvar criminal_bounty;#say Bounty Set has been cleared} "-"
#TRIGGER {(%w) wanted for*, reward (%d) platinums.} {#if (!%ismember( %1, @criminals)) {criminal_bounty=%additem( %2, @criminal_bounty);#ADDITEM criminals %1} {#MATH temp_bounty %number( %item( @criminal_bounty, %ismember( %1, @criminals)))+%2;#VAR criminal_bounty %replaceitem( @temp_bounty, %ismember( %1, @criminals), @criminal_bounty)}} "wantedlist"
#TRIGGER {^List of all wanted criminals.$} {#T+ wantedlist} "-"
#TRIGGER {<} {#T- wantedlist;#say Most Wanted List Prepared, type "bounty 10" for Ten Most Wanted.} "wantedlist" |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sun Feb 03, 2002 1:05 pm |
Is this the only line that gives a syntax error?:
#VAR dots {%rightback( %repeat( ".", )10, )}
It should be:
#VAR dots {%rightback( %repeat( ".", 10), number )}
There is a number missing where I put number too. Also, I don't know why you do this to fill the variable. Since you already know how many dots you want in the variable, there is no reason to create them using %repeat and then get only some of them using %righback. So I think that, maybe, the %rightback should not be there.
Kjata |
|
|
|
psm Novice
Joined: 19 Jan 2002 Posts: 34 Location: Austria
|
Posted: Mon Feb 04, 2002 12:17 pm |
As i said, i found that script, so i don't really have a clue about it. the fact that i am completely script-dump, does not help much either :)
hence my post
but thx for trying |
|
|
|
|
|
|
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
|
|