CLEO Help Textdraw will crash client?

CLEO related
Status
Not open for further replies.

Donboo

New member
Joined
Mar 23, 2014
Messages
4
Reaction score
0
Code:
WHILE TRUE
WAIT 2000
    IF 31@ == 1
    THEN
        31@ = 0
        29@ = 7
        gosub @DRAW
    END
END

:DRAW
0AC8: 28@ = allocate_memory_size 260
03F0: enable_text_draw 1
0342: set_text_draw_centered 1
03E0: draw_text_behind_textures 0
033F: set_text_draw_letter_size width 0.30 height 1.36
081C: draw_text_outline 1 RGBA 0 0 0 255
0340: set_text_draw_RGBA R G B 255
0AA8: call_function_method 0x6A0050 0xC1B340 num_params 1 pop 0 'CRED000' 0@
0AA5: call 0x718600 2 pop 2 0@ 29@
033E: set_draw_text_position 87.0 300.0 GXT 'CRED000' 
0AC9: free_allocated_memory 28@
RETURN
Why? :not bad: Thank you!
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
272
Cause 29@ doesn't contain a pointer to a string.
Use 28@ since you already allocate useless memory for it, and format it with whatever string you want.
 
Status
Not open for further replies.
Top