Hello UGBase,
I've recently gotten into creating CLEO scripts and followed Blackhat's tutorial to get a basic understanding of how it works and decided to try something myself, but I just can't get it working. I'm not asking for you to fix my code and provide working code, just an explanation on what I'm doing wrong. This is my current code (which crashes upon pressing 8):
What I'm trying to achieve is:
Reading the text of a dialog and entering the text into the field of the dialog window (for paychecks on roleplay servers, for example). I'm not sure if this is possible though.
I've tried doing something else as well, getting the current player hp and posting it to the chat, but that code also just crashes the game upon pressing Numpad 8, which is obviously not what I want.
What is causing this to crash? I understand that this question may seem retarded to people more experienced with scripting in CLEO, but I'm just lost. Thank you for taking your time to answer my question
I've recently gotten into creating CLEO scripts and followed Blackhat's tutorial to get a basic understanding of how it works and decided to try something myself, but I just can't get it working. I'm not asking for you to fix my code and provide working code, just an explanation on what I'm doing wrong. This is my current code (which crashes upon pressing 8):
Code:
{$CLEO .cs}
0000: NOP
:MAIN
wait 0
if
0AB0: key_pressed 104 //Numpad 8
jf @MAIN
wait 0
1@ = SAMP.GetDialogID()
0AF8: samp add_message_to_chat 1@ color 12451840
wait 5000
jump @MAIN
What I'm trying to achieve is:
Reading the text of a dialog and entering the text into the field of the dialog window (for paychecks on roleplay servers, for example). I'm not sure if this is possible though.
I've tried doing something else as well, getting the current player hp and posting it to the chat, but that code also just crashes the game upon pressing Numpad 8, which is obviously not what I want.
Code:
0B25: samp 2@ = get_player_health $PLAYER_ACTOR
0AF8: samp add_message_to_chat 2@ color 12451840
What is causing this to crash? I understand that this question may seem retarded to people more experienced with scripting in CLEO, but I'm just lost. Thank you for taking your time to answer my question