Jump to content

[help] 10 best time on map


2paq

Recommended Posts

I know it seems noone is giving u any help here, and im sorry.

i need to mention... i still dont see enough checks for duplicte names, u need to add a lot more :lol: i can see u do the occasional check but i dont see one for 1st place, on 2nd and 3rd, u only check 1st, etc etc.

the way ur doing ur script, after adding the checks, ur script will be 10 times the size :wink:

Link to comment
  • Replies 56
  • Created
  • Last Reply

Top Posters In This Topic

yes it works but ...

- one time when I play I finished second and me time was write to file but somone who was first I get beter time (personal rekord) wasn't write ...

- player name: .GranT get rekord - say dat have get New Best Time ....

but in file don't write his nick (time wrote good): n/a - 12mins 23sec 34ms

when I analise the script I think that everythink is good and must work ...

but I wrote this and I need someone else who chack this ...

Link to comment

Well looking at the snippets u posted, it looks impossible to update one without the other, since u do name and time together, so maybe it's a writing to ini problem, did u check mirc for write errors? invalid paramaters or anything show up? its possible that the . on the name may have messed it up, i know ive read somewhere b4 that certain other characters apart from the obvious, can mess with ini's, but since i dont use them very often i cant really remember. But if this was the case, u would have got an error of some kind. try simulating the circumstances, use a similar or the same name, and set a better time, see what happens. check mirc for errors.

Link to comment

in mIRC was error and say that in the line script when is the write to file

you have right ... but when use GUS script it never hapend something ...

but thx for all

if I don't see more bug - I upload file with the script

Edit (2007-03-23 18:51):

grantsw4.png

nick: .GranT- <-- wchich charakter made the bug??

but in file is good ...

can by a problem in read from ini??

it's is the n-th time/bug with nick: .GranT-

Link to comment

well u said it was a write error, without seeing the read and write info i couldnt say. im sure u will figure it out anyway. i thought it might be the .

but it was a guess, without doing a check i wouldnt know, the other chars look fine tho. im sure by now uve probably fixed that tho. ;)

Link to comment

whats the full line?

kicsimicky, hes still making it, he knows it has bugs and thats what we're talking about, he also knows that there are better ways that this can be made.

noone has made it tho, noones had time, so, in the mean time, he is learning while he makes it.

we already said his script was huge:P but if it works and he made it all himself, then its a good start, later he can work on ways to improve it. or maybe others will post their ways of recording the top 10 times.

Link to comment

ok i think i see the problem.

his nick is .GranT-

u ask in (3) is nick > 0

try using something like: %nick1 = $iif(%nick1 == -1,n/a,$v1)

or: if (%nick1 == -1) %nick1 = n/a

or change it to n/a in the var line in (2)

any of these should fix it.

Link to comment
  • 1 month later...

what is wrong witch this??

else { 
 mta.text $1 $mta.nick($1,%a) on $mta.race($1) doesn't have time in TOP20
 var %lasttime = $findtok(%time01 %time02 %time03 %time04 %time05 %time06 %time07 %time08 %time09 %time10 %time11 %time12 %time13 %time14 %time15 %time16 %time17 %time18 %time19 %time20,-1,1,32)
 if (%lasttime == $null) mta.text $1 Last time in TOP20 on map $mta.race($1) $+ : %time20mins $+ mins %time20sec $+ sec %time20ms $+ ms
 elseif (%lasttime == 1) mta.text $1 NO Best Time on map $mta.race($1) $+ !
 else mta.text $1 On the list are only $calc(%lasttime - 1) $+ /20 top time's
}

It's look like that $findtok doesn't check more then 10 parameters ...

When

%time01 - %time02 are != -1 

$findtok return $null

Link to comment
  • 3 months later...

I have script that delete time from TOP20 by you must by on the map, that you wont to delete time ...

But now I need script that delete time form map I wont, not this which I play on.

Script that I wrote, work:

- !del OK

Error - parameter must by a number between 1-20!

- !del <1-20> OK

Time $4 erased!

- !10del <1-20> OK

Error - Syntax: $3 <1-20>

Replace character " " (space) with this "_" !!

- !10del <1-20> Doesn't work!

Do nothing!

I need that only when you wrote full_name_of_map this script erase cheating time!

  elseif (($3 == !10del) || ($3 == !20del)) { 
    if ($gus.level($1,$2) >= 7) { 
      if (!$4) mta.pm $1 $2 Error - missing parameter! 
      elseif ($4 isnum) { 
        if ((0 > $4 ) || ($4 > 20)) mta.pm $1 $2 Error - parameter must by a number between 1-20! 
        else { 
          if (!$5) var %del.race.time = $mta.race($1) 
          elseif ($5 != $null && $5 == $replace($readini($scriptdir $+ 1.ini,Races,$mta.races($1,$replace($5,$chr(95),$chr(32)))),$chr(32),$chr(95))) var %del.race.time = $readini($scriptdir $+ 1.ini,Races,$mta.races($1,$replace($5,$chr(95),$chr(32)))) 
          else { 
            mta.pm $1 $2 Error - Syntax: $3 <1-20> <full map name>  
            mta.pm $1 $2 Replace character " " (space) with this "_" !! 
          } 
            if (%del.race.time != $null) { 
            var %nick01 = $iif($readini($scriptdir $+ 10times.ini,NICK01,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %nick02 = $iif($readini($scriptdir $+ 10times.ini,NICK02,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %nick03 = $iif($readini($scriptdir $+ 10times.ini,NICK03,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %nick04 = $iif($readini($scriptdir $+ 10times.ini,NICK04,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %nick05 = $iif($readini($scriptdir $+ 10times.ini,NICK05,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %nick06 = $iif($readini($scriptdir $+ 10times.ini,NICK06,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %nick07 = $iif($readini($scriptdir $+ 10times.ini,NICK07,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %nick08 = $iif($readini($scriptdir $+ 10times.ini,NICK08,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %nick09 = $iif($readini($scriptdir $+ 10times.ini,NICK09,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %nick10 = $iif($readini($scriptdir $+ 10times.ini,NICK10,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %nick11 = $iif($readini($scriptdir $+ 10times.ini,NICK11,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %nick12 = $iif($readini($scriptdir $+ 10times.ini,NICK12,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %nick13 = $iif($readini($scriptdir $+ 10times.ini,NICK13,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %nick14 = $iif($readini($scriptdir $+ 10times.ini,NICK14,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %nick15 = $iif($readini($scriptdir $+ 10times.ini,NICK15,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %nick16 = $iif($readini($scriptdir $+ 10times.ini,NICK16,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %nick17 = $iif($readini($scriptdir $+ 10times.ini,NICK17,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %nick18 = $iif($readini($scriptdir $+ 10times.ini,NICK18,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %nick19 = $iif($readini($scriptdir $+ 10times.ini,NICK19,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %nick20 = $iif($readini($scriptdir $+ 10times.ini,NICK20,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %time01 = $iif($readini($scriptdir $+ 10times.ini,TOPT01,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %time02 = $iif($readini($scriptdir $+ 10times.ini,TOPT02,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %time03 = $iif($readini($scriptdir $+ 10times.ini,TOPT03,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %time04 = $iif($readini($scriptdir $+ 10times.ini,TOPT04,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %time05 = $iif($readini($scriptdir $+ 10times.ini,TOPT05,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %time06 = $iif($readini($scriptdir $+ 10times.ini,TOPT06,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %time07 = $iif($readini($scriptdir $+ 10times.ini,TOPT07,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %time08 = $iif($readini($scriptdir $+ 10times.ini,TOPT08,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %time09 = $iif($readini($scriptdir $+ 10times.ini,TOPT09,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %time10 = $iif($readini($scriptdir $+ 10times.ini,TOPT10,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %time11 = $iif($readini($scriptdir $+ 10times.ini,TOPT11,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %time12 = $iif($readini($scriptdir $+ 10times.ini,TOPT12,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %time13 = $iif($readini($scriptdir $+ 10times.ini,TOPT13,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %time14 = $iif($readini($scriptdir $+ 10times.ini,TOPT14,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %time15 = $iif($readini($scriptdir $+ 10times.ini,TOPT15,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %time16 = $iif($readini($scriptdir $+ 10times.ini,TOPT16,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %time17 = $iif($readini($scriptdir $+ 10times.ini,TOPT17,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %time18 = $iif($readini($scriptdir $+ 10times.ini,TOPT18,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %time19 = $iif($readini($scriptdir $+ 10times.ini,TOPT19,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            var %time20 = $iif($readini($scriptdir $+ 10times.ini,TOPT20,$replace(%del.race.time,$chr(32),-)),$v1,-1) 
            if ($4 == 1) { 
              %nick01 = %nick02 
              %time01 = %time02 
              !writeini -n " $+ $scriptdir $+ 10times.ini" TOPT01 $replace(%del.race.time,$chr(32),-) %time01 
              !writeini -n " $+ $scriptdir $+ 10times.ini" NICK01 $replace(%del.race.time,$chr(32),-) %nick01 
            } 
            if ($4 <= 2) { 
              %nick02 = %nick03 
              %time02 = %time03 
              !writeini -n " $+ $scriptdir $+ 10times.ini" TOPT02 $replace(%del.race.time,$chr(32),-) %time02 
              !writeini -n " $+ $scriptdir $+ 10times.ini" NICK02 $replace(%del.race.time,$chr(32),-) %nick02 
            } 
            if ($4 <= 3) { 
              %nick03 = %nick04 
              %time03 = %time04 
              !writeini -n " $+ $scriptdir $+ 10times.ini" TOPT03 $replace(%del.race.time,$chr(32),-) %time03 
              !writeini -n " $+ $scriptdir $+ 10times.ini" NICK03 $replace(%del.race.time,$chr(32),-) %nick03 
            } 
            if ($4 <= 4) { 
              %nick04 = %nick05 
              %time04 = %time05 
              !writeini -n " $+ $scriptdir $+ 10times.ini" TOPT04 $replace(%del.race.time,$chr(32),-) %time04 
              !writeini -n " $+ $scriptdir $+ 10times.ini" NICK04 $replace(%del.race.time,$chr(32),-) %nick04 
            } 
            if ($4 <= 5) { 
              %nick05 = %nick06 
              %time05 = %time06 
              !writeini -n " $+ $scriptdir $+ 10times.ini" TOPT05 $replace(%del.race.time,$chr(32),-) %time05 
              !writeini -n " $+ $scriptdir $+ 10times.ini" NICK05 $replace(%del.race.time,$chr(32),-) %nick05 
            } 
            if ($4 <= 6) { 
              %nick06 = %nick07 
              %time06 = %time07 
              !writeini -n " $+ $scriptdir $+ 10times.ini" TOPT06 $replace(%del.race.time,$chr(32),-) %time06 
              !writeini -n " $+ $scriptdir $+ 10times.ini" NICK06 $replace(%del.race.time,$chr(32),-) %nick06 
            } 
            if ($4 <= 7) { 
              %nick07 = %nick08 
              %time07 = %time08 
              !writeini -n " $+ $scriptdir $+ 10times.ini" TOPT07 $replace(%del.race.time,$chr(32),-) %time07 
              !writeini -n " $+ $scriptdir $+ 10times.ini" NICK07 $replace(%del.race.time,$chr(32),-) %nick07 
            } 
            if ($4 <=  { 
              %nick08 = %nick09 
              %time08 = %time09 
              !writeini -n " $+ $scriptdir $+ 10times.ini" TOPT08 $replace(%del.race.time,$chr(32),-) %time08 
              !writeini -n " $+ $scriptdir $+ 10times.ini" NICK08 $replace(%del.race.time,$chr(32),-) %nick08 
            } 
            if ($4 <= 9) { 
              %nick09 = %nick10 
              %time09 = %time10 
              !writeini -n " $+ $scriptdir $+ 10times.ini" TOPT09 $replace(%del.race.time,$chr(32),-) %time09 
              !writeini -n " $+ $scriptdir $+ 10times.ini" NICK09 $replace(%del.race.time,$chr(32),-) %nick09 
            } 
            if ($4 <= 10) { 
              %nick10 = %nick11 
              %time10 = %time11 
              !writeini -n " $+ $scriptdir $+ 10times.ini" TOPT10 $replace(%del.race.time,$chr(32),-) %time10 
              !writeini -n " $+ $scriptdir $+ 10times.ini" NICK10 $replace(%del.race.time,$chr(32),-) %nick10 
            }  
            if ($4 <= 11) { 
              %nick11 = %nick12 
              %time11 = %time12 
              !writeini -n " $+ $scriptdir $+ 10times.ini" TOPT11 $replace(%del.race.time,$chr(32),-) %time11 
              !writeini -n " $+ $scriptdir $+ 10times.ini" NICK11 $replace(%del.race.time,$chr(32),-) %nick11 
            }   
            if ($4 <= 12) { 
              %nick12 = %nick13 
              %time12 = %time13 
              !writeini -n " $+ $scriptdir $+ 10times.ini" TOPT12 $replace(%del.race.time,$chr(32),-) %time12 
              !writeini -n " $+ $scriptdir $+ 10times.ini" NICK12 $replace(%del.race.time,$chr(32),-) %nick12 
            } 
            if ($4 <= 13) { 
              %nick13 = %nick14 
              %time13 = %time14 
              !writeini -n " $+ $scriptdir $+ 10times.ini" TOPT13 $replace(%del.race.time,$chr(32),-) %time13 
              !writeini -n " $+ $scriptdir $+ 10times.ini" NICK13 $replace(%del.race.time,$chr(32),-) %nick13 
            } 
            if ($4 <= 14) { 
              %nick14 = %nick15 
              %time14 = %time15 
              !writeini -n " $+ $scriptdir $+ 10times.ini" TOPT14 $replace(%del.race.time,$chr(32),-) %time14 
              !writeini -n " $+ $scriptdir $+ 10times.ini" NICK14 $replace(%del.race.time,$chr(32),-) %nick14 
            } 
            if ($4 <= 15) { 
              %nick15 = %nick16 
              %time15 = %time16 
              !writeini -n " $+ $scriptdir $+ 10times.ini" TOPT15 $replace(%del.race.time,$chr(32),-) %time15 
              !writeini -n " $+ $scriptdir $+ 10times.ini" NICK15 $replace(%del.race.time,$chr(32),-) %nick15 
            } 
            if ($4 <= 16) { 
              %nick16 = %nick17 
              %time16 = %time17 
              !writeini -n " $+ $scriptdir $+ 10times.ini" TOPT16 $replace(%del.race.time,$chr(32),-) %time16 
              !writeini -n " $+ $scriptdir $+ 10times.ini" NICK16 $replace(%del.race.time,$chr(32),-) %nick16 
            } 
            if ($4 <= 17) { 
              %nick17 = %nick18 
              %time17 = %time18 
              !writeini -n " $+ $scriptdir $+ 10times.ini" TOPT17 $replace(%del.race.time,$chr(32),-) %time17 
              !writeini -n " $+ $scriptdir $+ 10times.ini" NICK17 $replace(%del.race.time,$chr(32),-) %nick17 
            } 
            if ($4 <= 18) { 
              %nick18 = %nick19 
              %time18 = %time19 
              !writeini -n " $+ $scriptdir $+ 10times.ini" TOPT18 $replace(%del.race.time,$chr(32),-) %time18 
              !writeini -n " $+ $scriptdir $+ 10times.ini" NICK18 $replace(%del.race.time,$chr(32),-) %nick18 
            } 
            if ($4 <= 19) { 
              %nick19 = %nick20 
              %time19 = %time20 
              !writeini -n " $+ $scriptdir $+ 10times.ini" TOPT19 $replace(%del.race.time,$chr(32),-) %time19 
              !writeini -n " $+ $scriptdir $+ 10times.ini" NICK19 $replace(%del.race.time,$chr(32),-) %nick19 
            } 
            if ($4 <= 20) { 
              %nick20 = -1 
              %time20 = -1 
              !writeini -n " $+ $scriptdir $+ 10times.ini" TOPT20 $replace(%del.race.time,$chr(32),-) %time20 
              !writeini -n " $+ $scriptdir $+ 10times.ini" NICK20 $replace(%del.race.time,$chr(32),-) %nick20  
            } 
            mta.pm $1 $2 Time $4 erased! 
          } 
        } 
      } 
      else mta.pm $1 $2 Error - parameter must by a number between 1-20! 
    } 
    else mta.pm $1 $2 Error - You must be level 7 to use this command.  
  } 

Link to comment

damn ur still trying to do this?? :roll:

u really need to start to learn how to use while loops and variables more

they would make ur script so much smaller and easier to read and use,

also, rather than using the whole command in ur command alias, start using seperate aliases.

i can see what ur doing here and im guessing u want to delete a certain time from any race?

more than likely, it would be the time in first place...

so all u need to do is get the race name from $5-

once u have the name, its only a matter of using a small loop to rewrite the ini

so u would have ur first alias to find the map name, once u can do that, remove the time.

its a simple to find the map name from $5-

alias findmap { 
  var %a = 0,%b = $5- 
  while (%a < $mta.races($1)) { 
    if (%b isin $mta.races($1,%a)) !return = $mta.races($1,%a)  
    !inc %a 
  } 
  !return 
} 

once u get it to return the map name, u already have what u need to remove the time.

sorry if this isnt helpful but i cant be bothered to go thru ur massive script :mrgreen:

Link to comment

amn ur still trying to do this?? :roll:

u really need to start to learn how to use while loops and variables more

they would make ur script so much smaller and easier to read and use,

also, rather than using the whole command in ur command alias, start using seperate aliases.

I wrote script when I need, if it's working I don't change it ...

I wrote because I need, not because I like to do this ...

I have script that delete time from TOP20 by you must by on the map, that you wont to delete time ...

But now I need script that delete time form map I wont, not this which I play on.

(...)

I need that only when you wrote full_name_of_map this script erase cheating time!

so u would have ur first alias to find the map name, once u can do that, remove the time.

line 8 in script posted above

but:

- !10del <1-20> OK

Error - Syntax: $3 <1-20>

Replace character " " (space) with this "_" !!

- !10del <1-20> Doesn't work!

Do nothing!

Link to comment
so u would have ur first alias to find the map name, once u can do that, remove the time.

its a simple to find the map name from $5-

alias findmap { 
  var %a = 0,%b = $5- 
  while (%a < $mta.races($1)) { 
    if (%b isin $mta.races($1,%a)) !return = $mta.races($1,%a)  
    !inc %a 
  } 
  !return 
} 

once u get it to return the map name, u already have what u need to remove the time.

sorry if this isnt helpful but i cant be bothered to go thru ur massive script :mrgreen:

hmm I think it help me ... :P

Link to comment

  elseif (($3 == !10del) || ($3 == !20del)) { 
    if ($gus.level($1,$2) >= 7) { 
      if (!$4) mta.pm $1 $2 Error - missing parameter! 
      elseif ($4 isnum) { 
        if ((0 > $4 ) || ($4 > 20)) mta.pm $1 $2 Error - parameter must by a number between 1-20! 
        else { 
          if (!$5) var %del.race.time = $mta.race($1) 
          elseif ($5 != $null && $findmap($1,$5) == $replace($5,$chr(95),$chr(32))) var %del.race.time = $findmap($1,$5) 
          else {  
            mta.pm $1 $2 Error - Syntax: $3 <1-20> <full_map_name> 
            mta.pm $1 $2 Replace character " " (space) with this "_" !! 
            if ($5 != $null) mta.pm $1 $2 $5 isn't full_map_name 
          } 
            if (%del.race.time != $null) { 

part that delete time's

            mta.pm $1 $2 Time $4 erased! 
          } 
        } 
      } 
      else mta.pm $1 $2 Error - parameter must by a number between 1-20! 
    } 
    else mta.pm $1 $2 Error - You must be level 7 to use this command.  
  } 

alias findmap { 
  var %a = 0 
  var %b = $replace($2,$chr(95),$chr(32)) 
    while (%a < $mta.races($1)) { 
      if (%b == $mta.races($1,%a)) !return = $mta.races($1,%a)  
      !inc %a 
    } 
  !return 
} 

and this not work ...

Link to comment

well the alias should work, try doing some echo's into mirc to see what the alias is returning,

do some tests on the alias and add: !echo 1 mapname: $findmap($1,$5)

into ur script so it will show u what values are being returned when u do !20del 1 drift

and then u should be able to fix the problem, if single words work, move onto bigger ones.

it doesnt look anything major.

Link to comment

alias findmap { 
  var %a = 0 
  var %b = $replace($2,$chr(95),$chr(32)) 
    while (%a < $mta.races($1)) { 
      if (%b == $mta.races($1,%a)) !return = $mta.races($1,%a) 
      !inc %a 
    } 
  !return 
} 

line 5 - "=" between

!return 

&

$mta.races($1,%a) 

alias findmap { 
  var %a = 0 
  var %b = $replace($2,$chr(95),$chr(32)) 
    while (%a < $mta.races($1)) { 
      if (%b == $mta.races($1,%a)) !return $mta.races($1,%a) 
      !inc %a 
    } 
  !return 
} 

And change this:

          elseif ($5 != $null) { 
            var %del.time.compare.map = $findmap($1,$5) 
            var %del.time.compare.name = $replace($5,$chr(95),$chr(32)) 
            if (%del.time.compare.map == %del.time.compare.name) var %del.race.time = %del.time.compare.map 
            else {  
              mta.pm $1 $2 Error - Syntax: $3 <1-20> <full_map_name> 
              mta.pm $1 $2 Replace character " " (space) with this "_" !! 
              if ($5 != $null) mta.pm $1 $2 $5 isn't full_map_name 
            } 
          } 

Now working:

  elseif (($3 == !10del) || ($3 == !20del)) { 
    if ($gus.level($1,$2) >= 7) { 
      if (!$4) {  
        mta.pm $1 $2 Error - missing parameter! 
        mta.pm $1 $2 Error - Syntax: $3 <1-20> <full_map_name> 
      } 
      elseif ($4 isnum) { 
        if ((0 > $4 ) || ($4 > 20)) mta.pm $1 $2 Error - parameter must by a number between 1-20! 
        else { 
          if (!$5) var %del.race.time = $mta.race($1) 
          elseif ($5 != $null) { 
            var %del.time.compare.map = $findmap($1,$5) 
            var %del.time.compare.name = $replace($5,$chr(95),$chr(32)) 
            if (%del.time.compare.map == %del.time.compare.name) var %del.race.time = %del.time.compare.map 
            else {  
              mta.pm $1 $2 Error - Syntax: $3 <1-20> <full_map_name> 
              mta.pm $1 $2 Replace character " " (space) with this "_" !! 
              if ($5 != $null) mta.pm $1 $2 $5 isn't full_map_name 
            } 
          } 
          if (%del.race.time != $null) { 

delete part of script

            } 
            mta.pm $1 $2 Time $4 erased! 
          } 
        } 
      } 
      else mta.pm $1 $2 Error - parameter must by a number between 1-20! 
    } 
    else mta.pm $1 $2 Error - You must be level 7 to use this command.  
  } 

Link to comment

the !retun will return the info needed, ie: $mta.races($1,%a) or nothing.

all u need to do is get it to return the map name u require, its not rocket science :)

how u changed it it will only return what u sent it.. if it exists.

alias findmap { 
  var %a = 0,%b = $2- 
  while (%a < $mta.races($1)) { 
    if (%b isin $mta.races($1,%a)) !return = $mta.races($1,%a) 
    !inc %a 
  } 
  !return 
} 

here... use this to get ur mapname from $5- with $findmap($1,$5-)

i havent tested it but it looks ok, and should work. once u have ur mapname, it should be simple enough to do what ur trying.

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...