Scooby Posted March 22, 2007 Share Posted March 22, 2007 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 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 Link to comment
Scooby Posted March 22, 2007 Share Posted March 22, 2007 ahh sorry my bad, i see what ur doing now. so, does it work now? Link to comment
2paq Posted March 23, 2007 Author Share Posted March 23, 2007 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
Scooby Posted March 23, 2007 Share Posted March 23, 2007 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
2paq Posted March 23, 2007 Author Share Posted March 23, 2007 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): 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
Scooby Posted March 24, 2007 Share Posted March 24, 2007 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
2paq Posted March 24, 2007 Author Share Posted March 24, 2007 in file is good - write: .GranT- mta.text $1 <-- this is the problem, but way?? Link to comment
Scooby Posted March 24, 2007 Share Posted March 24, 2007 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
2paq Posted March 24, 2007 Author Share Posted March 24, 2007 this is the part of script that I use to read and show in file is good - but when show is "n/a - 12min 34sec 567ms" Link to comment
Scooby Posted March 24, 2007 Share Posted March 24, 2007 sorry... i cant see it, half doesnt fit on my page and i dont know how to fix. Link to comment
2paq Posted March 25, 2007 Author Share Posted March 25, 2007 I have the same problem but you can right clik "Save as..." or "Save image ..." Link to comment
Scooby Posted March 25, 2007 Share Posted March 25, 2007 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
2paq Posted April 28, 2007 Author Share Posted April 28, 2007 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
2paq Posted April 28, 2007 Author Share Posted April 28, 2007 Sorry I can't edit my post's ... Edit: It's look like that $findtok doesn't check more then 10 parameters ... When Code: %time01 - %time10 are != -1 $findtok return $null Link to comment
Scooby Posted April 28, 2007 Share Posted April 28, 2007 lol i only just got a reply email to this.. 2 months late... did u ever get it working? Link to comment
2paq Posted August 23, 2007 Author Share Posted August 23, 2007 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
Scooby Posted August 24, 2007 Share Posted August 24, 2007 damn ur still trying to do this?? 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 Link to comment
2paq Posted August 26, 2007 Author Share Posted August 26, 2007 amn ur still trying to do this?? 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
2paq Posted August 26, 2007 Author Share Posted August 26, 2007 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 hmm I think it help me ... Link to comment
2paq Posted August 26, 2007 Author Share Posted August 26, 2007 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
Scooby Posted August 26, 2007 Share Posted August 26, 2007 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
2paq Posted August 27, 2007 Author Share Posted August 27, 2007 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
Scooby Posted August 27, 2007 Share Posted August 27, 2007 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
2paq Posted August 28, 2007 Author Share Posted August 28, 2007 it work's --> that what I posted in my last post I only posted this, because fore someone that can by useful - I was learn scripting only form this forum on base of mistakes everybody else Link to comment
Recommended Posts