Hi
I have added slice preload_bits_offset(slice s, int offset, int len) asm "SDSUBSTR"; in imports/stdlib.fc and used

@name(preload_bits_offset)
extends native preloadBitsOffset(self: Slice, offset: Int, len: Int): Slice;

for native calls but it is not working!
Should I do something else to use this function?

Nov 27, 2023, 12:30 PM
It should work; what happens when you call it?
Nov 27, 2023, 1:01 PM
I had some problems with the Tact extension on vsCode. It is working but underlined by that extension
I defined

(int) divc (int x, int y) asm "DIVC";

in imports/stdlib.fc

and used

@name(divc)
native divc(x: Int, y: Int): Int;

but getting this error:

error: undefined function `divc`, defining a global function of unknown type
$out = divc(($out * $in), 10000);
^
💥 Compilation failed. Skipping packaging
Solved:

added import "./../imports/stdlib.fc";!!
Nov 28, 2023, 9:33 AM
Also, is self.reply related to the error?
Nov 28, 2023, 11:22 AM

© 2024 Draquery.com All rights reserved.