|
Joined: Aug 2006
Posts: 14
Pikka bird
|
OP
Pikka bird
Joined: Aug 2006
Posts: 14 |
Hello, I've got some weird problem. I got a script, which runs great. The only problem is, if the actions is triggered, it floods the chan im in with such messages as these:
error: unknown command ( IF)
The Space between the ( and IF is a tab. Thats why i deleted all the tabs in my scripts, but after I've done that, the script stopped working.. Any ideas what that could cause / could be ? Thanks SR
|
|
|
|
Joined: Oct 2003
Posts: 313
Fjord artisan
|
Fjord artisan
Joined: Oct 2003
Posts: 313 |
Do you now get "unknown command (IF)"?
Each keyword needs spaces around it.
[code] if (condition) { do something } [code]
Sais
|
|
|
|
Joined: Aug 2006
Posts: 14
Pikka bird
|
OP
Pikka bird
Joined: Aug 2006
Posts: 14 |
Do you now get "unknown command (IF)"?
Each keyword needs spaces around it.
[code] if (condition) { do something } [code] No I don't get any error anymore when removing the tab, the script just wont work anymore. And thanks for the spaces thingy, ill try it out asap EDIT: Added spaces etc. but i still get the same error. Is there no way of telling MIRC that there is no format in a script ? EDIT 2: Looks like i found the problem, it wasn't a prob with the script itself after all, my client gives out that error message when someone writes [OK] Dont ask me why.
Last edited by skullrappa; 11/11/06 10:06 PM.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
You probably have a script running that watches for that, then. Check all your on TEXT events in all your scripts.
Btw, mIRC inserts formatting spaces if you switch between tabs (based on your {}'s).
Last edited by Riamus2; 11/11/06 10:26 PM.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Aug 2006
Posts: 14
Pikka bird
|
OP
Pikka bird
Joined: Aug 2006
Posts: 14 |
You probably have a script running that watches for that, then. Check all your on TEXT events in all your scripts. Yes did that, and found some and removed them. They were similar scripts to the one now, which means i still ahve the same problem with that tab thing.
|
|
|
|
Joined: Jul 2006
Posts: 242
Fjord artisan
|
Fjord artisan
Joined: Jul 2006
Posts: 242 |
Newbie
|
|
|
|
Joined: Aug 2006
Posts: 14
Pikka bird
|
OP
Pikka bird
Joined: Aug 2006
Posts: 14 |
ok, since i cant paste the whole script, heres just the part which causes that problem:
on *:TEXT:*OK*:#dojo10:{ set %text2 $strip($3,burc) | set %text3 $remove($strip($4),$chr(91),$chr(93))
if ($nick == NICK && TEXT4 isin $1 && %text2 == %text1) {
if (m isin %text3 && $remove(%text3,m) <= 4) || (s isin %text3) && ($remove(%text3,s) <= 59 || $remove(%text3,s) = 0) {
{
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
You obviously still have tabs there. Remove them and try.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Aug 2006
Posts: 14
Pikka bird
|
OP
Pikka bird
Joined: Aug 2006
Posts: 14 |
You obviously still have tabs there. Remove them and try. Yeah, those were tabs i was talking about, i removed them already but then the script stops working.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Then you may have other problems. Never hit TAB in a script to get formatting done. Formatting is done automatically if you switch tabs (assuming your {}'s aren't mismatched), if you don't feel like formatting it yourself using spaces.
Try showing more of the script and it would help. It would probably be something above where you are at. First, make sure you get rid of ALL the tabs. Then, switch tabs to something other than remotes and then back to remotes. If your {}'s aren't mismatched, then your formatting will be correct from top to bottom of the script. If not, then click the {} mismatch button to see if anything is messed up, or just look for it yourself.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Oct 2003
Posts: 313
Fjord artisan
|
Fjord artisan
Joined: Oct 2003
Posts: 313 |
There's also the "{}" button (next to the "goto line" button at the top left of the editor window) which formats the file, and advises of mismatched parentheses.
(I think Mentality pointed me at a keyboard shortcut once, but I can't find what it is in the help file...anyone?)
Sais
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
If not, then click the {} mismatch button to see if anything is messed up... 
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Oct 2003
Posts: 313
Fjord artisan
|
Fjord artisan
Joined: Oct 2003
Posts: 313 |
Oops. Sorry. I did actually read that, honest! (I guess it's because it's not saying "this will reformat it for you", and you'd already said "switch tabs to reformat" which made me make the comment)
Sais
|
|
|
|
|