As far as i can see the error is talking about the $tcp_buffer variable that is undefined, but as you can see i check if tcp_buffer exists and create it if is does not exist. I also tried tried to check if it exists in the wait function. But it still crashes at this point sometimes. It will run fine for a few times and then give the error. Does anyone have any ideas how to fix this?
When you are asking for help, please supply the code as well, not just a screenshot!
The error tells you something is wrong in step=18.
The Kawasaki ignores lines where no executable code is present, in your screenshot I can see 4 lines without code. Therefore I expect your error to be at least on line 22.
In line 23 & 24 you are decoding the $tcp_buffer using the command $DECODE to transform a string variable. So this is the code where I expect you to possibly have errors.
Running the following lines of code in K-Roset (Kawasaki simulation) reproduces the same error you are talking about
So if the variable $buffer is filled with string information without pipes, your ‘if statement’ will pass, but the first $DECODE command will empty your string variable. This can cause an error in the next line.
Please let us know if this indeed is the problem you are having!
(E0102) Variable is not defined.
Program = test1 Step = 9
Program aborted.No = 1
so I am of the opinon that the problem is with the actual line 18 of our code. It could still be somerting related to the problem you pointed out and i will see if i can recreate and debug the issue on the simulator.
I have atached our .as file. It is a modified version of this library https://github.com/G-Paris/kawapai and has been working perfectly for our entire project until for today.