Hi, I'm sure which script(s) you used, and what you're trying to achieve, but here are a few comments.
2010/3/13 Shashank Singh <[email protected]>: > def smooth_add() = > d = 1. # delay before mixing after beginning of mix > p = 0.2 # portion of normal when mixed > end This function takes no argument and returns nothing (in short, it has type ()->unit). Also, it has no "effect": it does not change any file, any memory value, doesn't print anything, etc. Let's start simple, and define a more useful function: def foo(s) "FOO #{s}" end This takes one argument, has no effect, but returns the string "FOO" followed by the argument (which must hence be printable, e.g. a string, but also an integer, etc). > ## Register the function as a server command > server.register(usage="smooth_add", description="Change the boolean value", > "smooth_add",smooth_add ) > > shash...@shashank-dingh:~/awaaz/playground/liquidsoap$ liquidsoap awaaz.liq > ERROR: This script is not well typed! > [...] > At line 19, char 49: > this value has type > ()->unit > (infered at line 10 char 1 - line 14 char 3) > but it should be a subtype of > (string)->string Here liquidsoap is telling you that the function associated to your new command is expected to have type (string)->string, i.e. it wants a function that takes a string (the command argument) and returns another string (the command output). You could use the function foo defined above, for example. Now, because you called your command smooth_add, I'm thinking that you want to use a smooth_add node and somehow trigger it using a telnet command. Please detail a bit more what you have in mind and we can describe simple ways to do it. Have fun, -- David ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Savonet-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-users
