[erlang-questions] escript head mismatch error

db <>
Thu Feb 28 02:54:41 CET 2008


Can someone tell me what's head mismatch error?

./rpc_test:17: head mismatch
escript: There were compilation errors.

Line 17 is this:
main(_) ->
    usage()


My escript:
#!/usr/bin/env escript
%% -*- erlang -*-
%-mode(compile).

-export([main/3, main/1, main/2]).
%-export([main/3]).

main(Node,Module,Args) ->
    try
        rpc:call(Node, Module, main, Args)

    catch
        _:_ ->
            usage()
    end;

main(_) ->
    usage().

main(_,_) ->
    usage().

usage() ->
    io:format("usage: You need to provide valid Node Name & Module Name &
Args\n"),
    halt(1).


thank you.
-- 
rk

That which we persist in doing becomes easier for us to do; not that the
nature of the thing itself is changed, but that our power to do is
increased.
-Ralph Waldo Emerson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080227/7f0e9345/attachment.html>


More information about the erlang-questions mailing list