diff --git a/c2logic/instructions.py b/c2logic/instructions.py index 43c281c..7a39531 100644 --- a/c2logic/instructions.py +++ b/c2logic/instructions.py @@ -162,7 +162,7 @@ class Read(Instruction): return f"read {self.dest} {self.src} {self.index}" class Write(Instruction): - def __init__(self, dest: str, src: str, index: str): + def __init__(self, src: str, dest: str, index: str): self.dest = dest self.src = src self.index = index diff --git a/include/builtins.h b/include/builtins.h index 04ad9bb..35f76cd 100644 --- a/include/builtins.h +++ b/include/builtins.h @@ -14,7 +14,7 @@ void shoot(struct MindustryObject obj, double x, double y, double shoot); struct MindustryObject get_link(double index); double read(struct MindustryObject cell, double index); -void write(struct MindustryObject cell, double index, double val); +void write(double val, struct MindustryObject cell, double index); void drawclear(double r, double g, double b); void drawcolor(double r, double g, double b);