Hi,

The situtation is a bit subtle here. The "=" operator makes a declaration,
so your code is the same as

radio = random(...)
if ... then
  radio2 = add([radio, ...])
end
radio3 = fallback([radio, ...])

The warning tells you that radio2 is never used and it's probably an error
(which it is :)). If you want to correct this, you should set radio
depending on the result of the if, ie something like

radio = random( weights = [1,5], [jingles,plist] )
radio = if wantHourJingle then add([radio, switch([({0m0s},
hour_jingle)])]) else radio end
radio = fallback([radio, security])

Cheers,

Samuel.

On Tuesday, January 21, 2014, [email protected] <[email protected]> wrote:

> Hi everyone!
>
>
>
> I have such a code:
>
>
>
> radio = random( weights = [1,5], [jingles,plist] )
> if wantHourJingle == true then
>         radio = add([radio, switch([({0m0s}, hour_jingle)])])
> end
> radio = fallback([radio, security])
>
> wantHourJindgle is a bool (true) variable in other, but included on top
> file. It returns me an error:
>
>
>
> At line 18, character 8: The variable radio defined here is not used
> anywhere  in its scope. Use ignore(...) instead of radio = ... if you
> meant  to not use it. Otherwise, this may be a typo or a sign that your
> script  does not do what you intend.
>
>
>
> How to repair it?
>
>
>
> Regards
>
>
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to