mIRC Home    About    Download    Register    News    Help

Print Thread
#164401 11/11/06 09:21 PM
Joined: Aug 2006
Posts: 14
S
Pikka bird
OP Offline
Pikka bird
S
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:
Code:
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

#164402 11/11/06 09:31 PM
Joined: Oct 2003
Posts: 313
S
Fjord artisan
Offline
Fjord artisan
S
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
#164403 11/11/06 09:43 PM
Joined: Aug 2006
Posts: 14
S
Pikka bird
OP Offline
Pikka bird
S
Joined: Aug 2006
Posts: 14
Quote:
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.
#164404 11/11/06 10:22 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
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
#164405 11/11/06 10:26 PM
Joined: Aug 2006
Posts: 14
S
Pikka bird
OP Offline
Pikka bird
S
Joined: Aug 2006
Posts: 14
Quote:
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.

#164406 11/11/06 10:51 PM
Joined: Jul 2006
Posts: 242
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Jul 2006
Posts: 242
paste the script


Newbie
#164407 11/11/06 11:02 PM
Joined: Aug 2006
Posts: 14
S
Pikka bird
OP Offline
Pikka bird
S
Joined: Aug 2006
Posts: 14
ok, since i cant paste the whole script, heres just the part which causes that problem:

Code:
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) {
	{

#164408 12/11/06 01:25 AM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
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
#164409 12/11/06 02:57 PM
Joined: Aug 2006
Posts: 14
S
Pikka bird
OP Offline
Pikka bird
S
Joined: Aug 2006
Posts: 14
Quote:
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.

#164410 12/11/06 03:46 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
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
#164411 13/11/06 03:10 PM
Joined: Oct 2003
Posts: 313
S
Fjord artisan
Offline
Fjord artisan
S
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
#164412 13/11/06 05:16 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Quote:
If not, then click the {} mismatch button to see if anything is messed up...


smile


Invision Support
#Invision on irc.irchighway.net
#164413 14/11/06 11:26 AM
Joined: Oct 2003
Posts: 313
S
Fjord artisan
Offline
Fjord artisan
S
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

Link Copied to Clipboard