CLEO Help Game freezes at loading screen

CLEO related
Status
Not open for further replies.

mfn

Member
Joined
Apr 30, 2013
Messages
22
Reaction score
0
What is wrong with my code ? Game is loading and when it is loaded then its freezed  :looky:
Code:
{$CLEO .cs}              
0000: NOP
 


:Increase_WeaponRange

If and

0AB0:   key_pressed 49
0AB0:   key_pressed 50

004D:   jump_if_false @Increase_WeaponRange
0ACD: show_text_highpriority "~g~activated!" time 1337 


10@ += 0x24 // 
10@ *= 0x70 // BLOCK SIZE
10@ += 0xC8AAB8 // BASE
005A: 10@ += 11@ // (int)
14@ = 1.0
0A8C: write_memory 10@ size 12@ value 14@ virtual_protect 0
0AB1: @Increase_WeaponRange 3 | -> Change Weapon 24 Offset 0x08 SIZE_OF_DAT 4
0002: jump @Decrease_WeaponRange
:Decrease_WeaponRange
If and

0AB0:   key_pressed 49
0AB0:   key_pressed 50

004D:   jump_if_false @Increase_WeaponRange
0ACD: show_text_highpriority "~g~deactivated!" time 1337 


0@ += 0x24 // 
0@ *= 0x70 // BLOCK SIZE
0@ += 0xC8AAB8 // BASE
005A: 0@ += 1@ // (int)
4@ = 0.01
0A8C: write_memory 0@ size 2@ value 4@ virtual_protect 0
0AB1: @Decrease_WeaponRange 3 | -> Change Weapon 24 Offset 0x08 SIZE_OF_DAT 4
0002: jump @Increase_WeaponRange
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
273
1. wait 0
2. calling a function that isn't a function from inside that function
3. vars 2@/12@ = 0, can't write memory with size 0
4. whole code is wrong.

Here are some basics on how to use functions in cleo.
http://ugbase.eu/tutorials/0ab1-call_scm_function/
 
Status
Not open for further replies.
Top