Lol, I was wondering why I am getting the exit_code 14 and I started debugging.
Eventually, I found out, that only one string can mess the things up.

slice msg = text.begin_parse();
msg~skip_bits(32);
builder my_builder = begin_cell();

while (~ msg.slice_empty?()) {
if (msg.slice_data_empty?()) {
msg = msg~load_ref().begin_parse();
}
int char = msg~load_uint(8);
int decrypted_char = shift_char(char, shift);

my_builder~store_uint(decrypted_char, 8); ;; <— here
}

Does anyone know why does it happen? I thought I made a mistake in shift_char but it does not throw any errors if I won’t add the string with storing integers in builder

Aug 17, 2023, 12:42 PM
do you have full module of your code? Can't find my_builder in your code then.
Aug 17, 2023, 12:49 PM
I’ve made an update. That is just an empty builder, so I decided not to mention it in the code at first
Aug 17, 2023, 12:49 PM
Might be helpful with full code — Using https://ton-ide-nujan.vercel.app/
Aug 17, 2023, 12:49 PM
Unfortunately, that is the full code and the line with store_uint causes the TVM to throw out of gas error 😕
Why does it consume so much gas if there is a side-effect inside that loop? What is the reason? I haven’t heard before about such… situations 🤔
Aug 17, 2023, 1:09 PM

© 2024 Draquery.com All rights reserved.