mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2007
Posts: 2
J
jks1952 Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
J
Joined: Jun 2007
Posts: 2
/goto: 'end' not found (line 213, fc-akick6.mrc)
-
* /goto: 'end' not found (line 213, fc-akick6.mrc)
-
* /goto: 'end' not found (line 213, fc-akick6.mrc)
this keeps coming up in my status. here is how it looks in the script
alias fc-akcheck {
if ( $nick isop $chan ) { goto end }
if ( %fcak-vprot == ON ) && ( $nick isvo $chan ) { goto end }
if (%fcak-join isin %fcak-allkick) {
if ( %fcak-swear == ON ) { goto swear }
else { goto textlen }
i have another too

Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
add

:end

last in the script.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Sparta said how to fix this, now I'm going to try to explain why.

You're using goto end, but there's nothing in the script to tell mIRC where end is. mIRC doesn't know that end is the end of the script, as all it sees is a string consisting of the characters e, n, and d

You'll get a similar problem with the goto swear

Please note that usage of goto statements is frowned upon when scripting. When you've got your script finished, you might want to think about posting it and asking for amendments and improvements.

Many of the helpers here will be happy to add in lines that could be used to improve your script. Some of us prefer to leave your active code as active, and use remarked statements for the improvements, others prefer to do it the other way around.

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
if the intent is to have :end be the last line in the subroutine/event-handler, it would be simpler to replace the "goto end" with just "return".


Link Copied to Clipboard