mIRC Home    About    Download    Register    News    Help

Print Thread
#24573 16/05/03 06:16 PM
Joined: Mar 2003
Posts: 49
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Mar 2003
Posts: 49
Whats wrong with this command?

on *:text:*:#:{
if ($1 ==!infoline)
if ($2 == add) {
write $mircdir\infoline\nicks.txt $nick
if ($exist(infoline\ [ $+ [ $3 ] ]) == $false) {
mkdir infoline\ [ $+ [ $3 ] $+ ]
msg $chan Info Line for $3 has been added
write infoline\ [ $+ [ $3 ] $+ ] $+ \Infoline.txt (by $address($nick,5)) $4-
writeini InfoLine\infoline.ini Total ilines $calc($readini(InfoLine\infoline.ini,Total,ilines) + 1)
writeini InfoLine\infoline.ini InfoLiners $nick $calc($readini(InfoLine\infoline.ini,InfoLiners,$nick) + 1)
writeini InfoLine\infoline.ini InfoLines $3 $calc($readini(InfoLine\infoline.ini,InfoLines,$3) + 1)
}
if ($exist(infoline\ [ $+ [ $3 ] $+ ]) == $true) {
msg $chan Info Line for $3 has been added
write infoline\ [ $+ [ $3 ] $+ ] $+ \Infoline.txt (by $address($nick,5)) $4-
writeini InfoLine\infoline.ini Total ilines $calc($readini(InfoLine\infoline.ini,Total,ilines) + 1)
writeini InfoLine\infoline.ini InfoLiners $nick $calc($readini(InfoLine\infoline.ini,InfoLiners,$nick) + 1)
writeini InfoLine\infoline.ini InfoLines $3 $calc($readini(InfoLine\infoline.ini,InfoLines,$3) + 1)
}
}
}

#24574 16/05/03 06:18 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Well, whats the problem? Whats the contents of an info file.


-KingTomato
#24575 16/05/03 06:21 PM
Joined: Mar 2003
Posts: 49
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Mar 2003
Posts: 49
When i write !infoline add SnakeRulez
this is not doing nothing

#24576 16/05/03 06:25 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Okay, so say you do type !infoline add SnakeRulez, What is supposed to happen.


-KingTomato
#24577 16/05/03 06:33 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Let me see if I can pretty this up...

on *:text:!infoline *:#:{
if ($$2 == add) && ($3 != $null) {
if ($read(infoline\nicks.txt, s, $nick) == $null) /write nicks.txt $nick
if (!$exist(infoline\ [ $+ [ $3 ] ])) /mkdir infoline\ [ $+ [ $3 ] $+ ]

/write infoline\ [ $+ [ $3 ] $+ ] \Infoline.txt (by $address($nick,5) $+ ) $4-
/writeini infoLine\infoline.ini Total ilines $calc($readini(infoLine\infoline.ini,Total,ilines) + 1)
/writeini infoLine\infoline.ini InfoLiners $nick $calc($readini(infoLine\infoline.ini,InfoLiners,$nick) + 1)
/writeini infoLine\infoline.ini InfoLines $3 $calc($readini(infoLine\infoline.ini,InfoLines,$3) + 1)

/msg $chan Info Line for $3 has been added
}
}

See if that works any better >:D


-KingTomato
#24578 16/05/03 06:37 PM
Joined: Jan 2003
Posts: 96
J
Babel fish
Offline
Babel fish
J
Joined: Jan 2003
Posts: 96
start with replacong all your \ with / wink
eg write $mircdir\infoline\nicks.txt $nick
should be write infoline/nicks.txt $nick

youre missing a space
if ($1 ==!infoline)
should be if ($1 == !infoline)
but you should: on *:TEXT:*!infoline*:#: { instead (and Im tired of telling you this!) wink

Last edited by Jesper; 16/05/03 06:38 PM.
#24579 16/05/03 06:39 PM
Joined: Mar 2003
Posts: 49
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Mar 2003
Posts: 49
Not working :\

#24580 16/05/03 06:39 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
And why exactly woul;d the \'s be /'s now? When you type a directory, do u not type C:\mirc

Btw jesper, //echo Dir: $mircdir -- Result:
Dir: C:\KTScript\

What kind of slashes are they?


-KingTomato
#24581 16/05/03 06:41 PM
Joined: Jan 2003
Posts: 96
J
Babel fish
Offline
Babel fish
J
Joined: Jan 2003
Posts: 96
cause it works just the same way as it does on the internet.....

its: writeini blah/blah.ini or run blah/blah.exe... just as when you type http:// wink

#24582 16/05/03 06:42 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
/ is UNIX style, \ is Windows style. Both work just fine on Windows, shouldn't really be a need to change it.


Link Copied to Clipboard