I am trying to read the first 5 characters of a char[6] stored in the exe's memory using the following code but keep getting exceptions and a crash when i run it. The readmemory line works as I use this to read integers in other parts of my code and it works fine.
Code:
0A8D: 4@v = read_memory 1@ size 5 virtual_protect 0
0AA8: call_function_method 0x6A0050 0xC1B340 num_params 1 pop 0 'BJ_PUSH' 2@
0AA5: call 0x718600 2 pop 2 2@ 4@v
03F0: enable_text_draw 1
033F: set_text_draw_letter_size 1.0 3.0
081C: draw_text_outline 1 RGBA 0 0 0 255
0340: set_text_draw_RGBA 255 255 255 255
0349: set_text_draw_font 3
033E: display_text 320.0 180.333 gxt 'BJ_PUSH'