CLEO Help Need Help..!

CLEO related
Status
Not open for further replies.

DzkAy

Well-known member
Joined
Feb 20, 2014
Messages
472
Reaction score
1
So i'm trying to make a Coord save - teleporter in-game ... but it always cause crash when i typed command /c1save or /c1load .. :bawww:

Here's the source:
Code:
{$VERSION 3.1.0027}
{$CLEO .cs}

thread "10-Coords Teleporter"
0000: " 10-Coords Teleport by D.Kay "
0662: printstring "\-----------------------------------/"
0662: printstring "Credits D.Kay"
0662: printstring "\-----------------------------------/" 

wait 5000
:CMD_66
wait 0
if
Player.Defined($PLAYER_ACTOR)
jf @CMD_66
0B34: samp register_client_command "c1save" to_label @DKAY_01
0B34: samp register_client_command "c1load" to_label @DKAY_02

:DKAY_999
wait 0
jump @DKAY_999


:DKAY_01
wait 0
if 
Player.Defined($PLAYER_ACTOR)
else_jump @DKAY_01
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
0AF8: samp add_message_to_chat "{1B7DBF}COORD 2 {FFFFFF}Is Now Saved." color 0xFFFFFF 1@ 
wait 250
jump @DKAY_02

:DKAY_02
wait 0
if 
Player.Defined($PLAYER_ACTOR)
else_jump @DKAY_02
Actor.PutAt($PLAYER_ACTOR, 1@, 2@, 3@)
0AF8: samp add_message_to_chat "{1B7DBF}COORD 1 {FFFFFF}Is Now Loaded." color 0xFFFFFF 1@ 
wait 250
jump @DKAY_01

-If anyone know where's the Problem .. pls help me  :surprised:
-Thanks very much for your help !  :urtheman:
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
275
Every command thread needs 0B43 at the end.

Code:
:DKAY_01
if player.Defined($PLAYER_ACTOR)
then 
    Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
    0AF8: samp add_message_to_chat "{1B7DBF}COORD 2 {FFFFFF}Is Now Saved." color 0xFFFFFF 1@
end
0B43: cmd_ret 


:DKAY_02
if player.Defined($PLAYER_ACTOR)
then
    Actor.PutAt($PLAYER_ACTOR, 1@, 2@, 3@)
    0AF8: samp add_message_to_chat "{1B7DBF}COORD 1 {FFFFFF}Is Now Loaded." color 0xFFFFFF 1@ 
end
0B43: cmd_ret
 

DzkAy

Well-known member
Joined
Feb 20, 2014
Messages
472
Reaction score
1
Idk what happens to my script but it keep crashing ( 2 addresses crash same time )  :red_eyes:
-Happen only when i typed cmd : /c1load or /c1save
1.
Code:
SA-MP 0.3z
Exception At Address: 0x00000000
Base: 0x01DF0000

Registers:
EAX: 0x000000AB	EBX: 0x0B132268	ECX: 0x0B132268	EDX: 0x00003D9B
ESI: 0x00000064	EDI: 0x00004300	EBP: 0x00004300	ESP: 0x0022F66C
EFLAGS: 0x00210202

Stack:
+0000: 0x002D2052   0x0B132268   0x002D2037   0x03691834
+0010: 0x00004300   0x0022F810   0x0022F7E0   0x0B132268
+0020: 0x015978F8   0x03691849   0x0B132268   0x0B132348
+0030: 0x036A83B7   0x0B132268   0x066E8B7C   0x066E7698
+0040: 0x0000000D   0x00000000   0x00000000   0x00000000
+0050: 0x00000000   0x00000000   0x00000000   0x00000000
+0060: 0x00000000   0x00000000   0x00000000   0x00000000
+0070: 0x00000000   0x00000000   0x00000000   0x00000000
+0080: 0x00000000   0x00000000   0x00000000   0x00000000
+0090: 0x00000000   0x00000000   0x00000000   0x00000000
+00A0: 0x00000000   0x00000000   0x00000000   0x00000000
+00B0: 0x00000000   0x00000000   0x00000000   0x00000000
+00C0: 0x00000000   0x0B129510   0x0033E0D0   0x632D3031
+00D0: 0x64726F6F   0x0B132378   0x0B132430   0x00000000
+00E0: 0x00000000   0x00000000   0x00000000   0x00000000
+00F0: 0x00000000   0x00000000   0x00000000   0x00240000
+0100: 0x00000000   0x00000000   0x00000000   0x00000000
+0110: 0x00000000   0x00000000   0x00000000   0x00000000
+0120: 0x00000000   0x00000000   0x00000000   0x00000000
+0130: 0x00000000   0x00000000   0x00000000   0x00000000
+0140: 0x00000000   0x00000000   0x00000000   0x00000000
+0150: 0x00000000   0x00000000   0x00000000   0x00000000
+0160: 0x00000000   0x00000000   0x00000000   0x00000000
+0170: 0x00000000   0x00000000   0x00000000   0x00000000
+0180: 0x414C911D   0x5F53866B   0x00000101   0x6173FF00
+0190: 0x003B4738   0x01000000   0x00251A00   0x00000000
+01A0: 0x01534E00   0x61733163   0x00006576   0x0022F844
+01B0: 0x7C80A284   0x01582FF8   0x0BDB1140   0x0BDB114E
+01C0: 0x01FFFE38   0x01FFFE3F   0x00000000   0x7C80A164
+01D0: 0x0BDB1140   0x00000007   0x00000101   0x01E86A15
+01E0: 0x00000000   0x00000000   0x066E8B7D   0x036A8254
+01F0: 0x016745A8   0x0000000D   0x066E7698   0x066E8B7D
+0200: 0x0022F880   0x066E8B7C   0xFFFFEB00   0x066E7698
+0210: 0x00000001   0x0000000D   0x00000101   0x0670DD68
+0220: 0x0670DD68   0x00000007   0x0EFFA000   0x00000000
+0230: 0x00000320   0x00002801   0x0C481FD0   0x00000000
+0240: 0x0022F8C0   0x4FE00674   0x00000000   0x0022F8C8
+0250: 0x00000000   0x0022F8D0   0x00000000   0x7C910098
+0260: 0x015DA040   0x015D6CE0   0x0022F8EC   0x4FE6689C
+0270: 0x015D6CE0   0x015D6CE0   0x098905F4   0x0000000D

SCM Op: 0x53F, lDbg: 0 LastRendObj: 1226

Game Version: US 1.0

State Information: Ped Context: 0

2.
Code:
SA-MP 0.3z
Exception At Address: 0x7C9116D4
Base: 0x01DF0000

Registers:
EAX: 0x0022FC18	EBX: 0x00330000	ECX: 0x0000FC18	EDX: 0x00000025
ESI: 0x0B1C1AE0	EDI: 0x0B1C1AE0	EBP: 0x0022FD7C	ESP: 0x0022FD70
EFLAGS: 0x00210246

Stack:
+0000: 0x00330000   0x0B1C22B8   0x00000000   0x0022FE50
+0010: 0x7C91082C   0x002D1CD8   0x01DF0000   0x0022FE34
+0020: 0x00000000   0x00313158   0x0B1C22C0   0x00000000
+0030: 0x00000000   0x7C90EABC   0x0022FE4C   0x7C90EA21
+0040: 0xFFFFFFFF   0x0022FE4C   0x0022FE5C   0x00000000
+0050: 0xC0000033   0x00000000   0x7C9360AC   0x0022FE4C
+0060: 0x7C91E955   0x7FFDFBF8   0x7C91E78E   0x002E98A4
+0070: 0x00000000   0x00000000   0x7FFDF000   0x00000068
+0080: 0x00070900   0x0022FE08   0x02080000   0x154F5568
+0090: 0x11024664   0x0022FFB0   0x00000020   0x0022FE58
+00A0: 0x002E98A4   0x00330000   0x00330000   0x0022FE4C
+00B0: 0x7C90F63C   0x7C90F641   0x00000000   0x00000000
+00C0: 0x0101000D   0x0000FC18   0x0022FD94   0x0022F994
+00D0: 0x0022FFB0   0x7C90E900   0x7C910040   0x00000001
+00E0: 0x0022FE64   0x002D8D94   0x00330000   0x00000000
+00F0: 0x0B1C22C0   0x0022FE94   0x002D5394   0x0B1C22C0
+0100: 0x0022FFB0   0x0031314C   0x00000000   0x002D53CE
+0110: 0xC0000005   0x00000000   0x002D5DB5   0x00823CAB
+0120: 0xC0000005   0x0022FFC0   0x00823CCC   0xC0000005
+0130: 0x00000001   0x00000000   0x0082472E   0xC0000005
+0140: 0x00000094   0x00000005   0x00000001   0x00000A28
+0150: 0x00000002   0x76726553   0x20656369   0x6B636150
+0160: 0x80003320   0x89BC9058   0x090000A0   0xB238DBE0
+0170: 0x8053F12E   0x8966BD78   0x89C64568   0x0000001F
+0180: 0x88F6F020   0xB8338540   0x80545B83   0xFFFFFFFF
+0190: 0x00000246   0x8054599B   0xB238DC28   0x88F6F020
+01A0: 0xB8338120   0x88F6F1BC   0x80503858   0x88F6F090
+01B0: 0x88F6F020   0x0022FE7B   0x69726373   0x5C737470
+01C0: 0x5F617467   0x735C6173   0x69747465   0x2E73676E
+01D0: 0x00824588   0x00000000   0x0012F5D0   0x7FFD8000
+01E0: 0xC0000005   0x00000005   0x01582479   0x00000044
+01F0: 0x01584920   0x01584BB0   0x01584848   0x00000000
+0200: 0x00000000   0x00000000   0x00000000   0x00000000
+0210: 0x00000000   0x00000000   0x00000000   0x00000000
+0220: 0x00000000   0xFFFFFFFF   0xFFFFFFFF   0xFFFFFFFF
+0230: 0x00000000   0x00000000   0x0022FEB0   0x0022F994
+0240: 0x0022FFE0   0x00825EA4   0x00888078   0xFFFFFFFF
+0250: 0x0022FFF0   0x7C817067   0x00000000   0x0012F5D0
+0260: 0x7FFD8000   0xC0000005   0x0022FFC8   0x0022F994
+0270: 0xFFFFFFFF   0x7C839AC0   0x7C817070   0x00000000

SCM Op: 0x53F, lDbg: 0 LastRendObj: 1226

Game Version: US 1.0

State Information: Ped Context: 0
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
275
Oh yea, didn't see that.

Code:
:DKAY_01
if player.Defined($PLAYER_ACTOR)
then 
    Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
    0AF8: samp add_message_to_chat "{1B7DBF}COORD 2 {FFFFFF}Is Now Saved." color 0xFFFFFF 
end
0B43: cmd_ret 


:DKAY_02
if player.Defined($PLAYER_ACTOR)
then
    Actor.PutAt($PLAYER_ACTOR, 1@, 2@, 3@)
    0AF8: samp add_message_to_chat "{1B7DBF}COORD 1 {FFFFFF}Is Now Loaded." color 0xFFFFFF  
end
0B43: cmd_ret

Your script had
Code:
0AF8: samp add_message_to_chat "{1B7DBF}COORD 2 {FFFFFF}Is Now Saved." color 0xFFFFFF 1@
You don't use variables at the end unless you have a parameter in the string. Like "0af8: "this is number %d" 0xFF00FF 5
 
Status
Not open for further replies.
Top