Problem with if statement ?.

Moderator: GiD Team

Post Reply
alexsunny123
Posts: 1
Joined: Sat Apr 03, 2021 8:58 am

Problem with if statement ?.

Post by alexsunny123 »

Hello,

I'm trying to use an IF statement in my .bas file as:

*loop intervals
check_mat=*IntvData(1)
*if(IntvData(1)!=0)
*IntvData(1),*IntvData(2),*IntvData(3)
*Set Cond Structure *nodes
*if(CondNumEntities>0)
*loop *nodes *OnlyInCond
*if(strcmp(*cond(1),"Liner")==0)
*cond(2),1,*NodesNum,*cond(4),*cond(3)
*endif
*end nodes
*endif
*endif
*end intervals
https://ometv.onl https://chatroulette.top https://omegle.wtf https://bazoocam.cam
with a condition:

NUMBER:30 CONDITION: Structure
CONDTYPE: over lines
CONDMESHTYPE: over nodes
QUESTION: Structural_element#CB#(Liner,Beam,Pile,Rockbolt)
VALUE:Liner
QUESTION: Sequential_ID
VALUE:1
QUESTION: Property_ID
VALUE:1
QUESTION: Segments
VALUE:10
END CONDITION

and:

INTERVAL DATA
QUESTION: Material_ID_to_modify
VALUE:1
QUESTION: Material_ID_to_apply
VALUE:1
QUESTION: Sequential_ID
VALUE:1
END INTERVAL DATA

But it keeps telling me "Error into an *if expression".

Why is it telling me this or what am I doing wrong?

thanks
alexsunny
Last edited by alexsunny123 on Wed May 12, 2021 2:17 pm, edited 1 time in total.
User avatar
escolano
Posts: 1915
Joined: Sun Sep 05, 1982 10:51 pm

Re: Problem with if statement ?.

Post by escolano »

try specifying that the field value must be considered as an integer with the extra argument ",int"

*if(IntvData(1,int)!=0)
Post Reply