[OpenSIPS-Users] If statement Syntax issue

osiris123d duane.larson at gmail.com
Sun Dec 6 22:23:07 CET 2009


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?


-- 
View this message in context: http://n2.nabble.com/If-statement-Syntax-issue-tp4122982p4122982.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.



More information about the Users mailing list