[OpenSIPS-Users] If statement Syntax issue

Bogdan-Andrei Iancu bogdan at voice-system.ro
Tue Dec 8 23:14:41 CET 2009


Hi Osiris,

Maybe the left side operand cannot be evaluated because was not defined 
(the $var(current_day) ). Can you check this ?

Regards,
Bogdan

osiris123d wrote:
> I have the following IF statement that looks to be good syntax but I am
> getting an error
>
> Here is the syntax
>
> if ( $var(current_day) >= $(avp(s:mobile_time){s.substr,8,1}) &&
> $var(current_day) <= $(avp(s:mobile_time){s.substr,9,1}) )
> {
> blah
> blah
> }
>
> The error I get is
> CRITICAL:core:comp_scriptvar: cannot get left var value
> WARNING:core:do_action: error in expression (l=650)
>
> All variables have values so I know thats not an issue and the substr
> Transformation is also correct .  If I edit the IF statement to only have
> the following it works fine
>
> if ( $var(current_day) >= $(avp(s:mobile_time){s.substr,8,1}) )
> {
> blah
> blah
> }
>
> Any clues?
>
>
>   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro




More information about the Users mailing list