# Error in function

**URL:** <https://forum.itascainternational.com/t/error-in-function/1626>\
**Category:** PFC\
**Tags:** fish, tips, suggestions\
**Created:** [August 9, 2024, 7:40am UTC](https://forum.itascainternational.com/t/error-in-function/1626 "2024-08-09T07:40:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShivamPandey](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@ShivamPandey](https://forum.itascainternational.com/u/ShivamPandey)\
**Post date:** [August 9, 2024, 7:40am UTC](https://forum.itascainternational.com/t/error-in-function/1626/1 "2024-08-09T07:40:59Z")

</div>

I sm trying to run the fish function in cyclic triaxial test program But I am getting error which is below the fish function  
fish define cyclic\_shear  
if (math.ln(wlz/lz0)_100.0)\<=-target  
wall.vel.z(wp\_bot)=[vel]  
wall.vel.z(wp\_top)=-[vel]  
wall.vel.x(wp\_lef)=0.25_[vel]  
wall.vel.x(wp\_rig)=-0.25\*[vel]  
wall.vel.y(wp\_fro)=0.25\*[vel]  
wall.vel.y(wp\_bac)=-0.25\*[vel]  
endif  
if (math.ln(wlz/lz0)_100.0) \>=target  
wall.vel.z(wp\_bot)=[vel]  
wall.vel.z(wp\_top)=-[vel]  
wall.vel.x(wp\_lef)=-0.25_[vel]  
wall.vel.x(wp\_rig)=0.25\*[vel]  
wall.vel.y(wp\_fro)=-0.25\*[vel]  
wall.vel.y(wp\_bac)=0.25\*[vel]  
endif  
end

pfc3d\>fish define cyclic\_shear  
Fish\> if (math.ln(wlz/lz0)\*100.0)\<=-target **; error is here not understanding**  
Fish\> wall.vel.z(wp\_bot)=[vel] **; error is here not understanding**  
\*\*\* Syntax error  
While compiling line 107 column 28 of source D:/PFC/Examples/abhik/Ottawa\_5.txt.  
While processing line 105 of source D:/PFC/Examples/abhik/Ottawa\_5.txt.

---

<div class="post-metadata">

**Author:** ![markus](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.itascainternational.com/markus/32/288_2.png) [@markus](https://forum.itascainternational.com/u/markus)\
**Post date:** [August 12, 2024, 2:43pm UTC](https://forum.itascainternational.com/t/error-in-function/1626/2 "2024-08-12T14:43:44Z")

</div>

You are already within a Fish function, so don’t use the square brackets (not [vel], just vel).
