error: unable to resolve comptime value
I am new to zig so I'm probably just using the library wrong but I cant figure this out so any help is appreciated.
I am making a custom logger with colour.
my code:
```
14 pub fn Print(self: Logger, s: []const u8) !void {
15 comptime var cham = Chameleon.init(.Auto);
16 if (self.level == LogLevel.Info or self.level == LogLevel.All) {
17 std.debug.print(cham.white().fmt(s), .{});
18 }
19 }
```
the error:
```
src\Logger.zig:17:46: error: unable to resolve comptime value
src\Logger.zig:17:46: note: argument to function being called at comptime must be comptime-known
```
关闭于 2024-08-02 1 条评论