I can not even make a simple code of 13 lines

Статус
В этой теме нельзя размещать новые ответы.

Kilowog01

Новичок
Автор темы
6
0
I'm starting to learn how to make scripts, after many problems I decided to dry my code, making it as simple as i can. And yet I ran into a problem. I want to make an anti-afk to enter / Online + a random value between 200 and 600 (to pass the anti-flood) but I get errors and the game crashes when the random value is said in the chat. In fact, the game crashes on my test using 0AF8 instead of 0AF9.
CLEO:
{$CLEO .cs}
0000:
REPEAT
    WAIT 0
UNTIL 0AFA:  SAMP_IS_READY
:script
    WAIT 30000 ms
    0209: 17@ = random_int_in_ranges 200 600
    0AF8: "{FF0000}SCRIPT:{FFFFFF} Funciona!!! \(°o°)/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" 17@ -1
    //0AF9: samp say_msg "/Online128"
    jump @script
0AB2: 0
0B43:


The errors that appears on screen are something like that
Warning(s007): Exception 0xC0000005 at 0x
Warning(s007): Exception 0xC0000005 at 0x
Warning(s007): Exception 0xC0000005 at 0x
Warning(s007): Exception 0xC0000005 at 0x
Warning(s007): Exception 0xC0000005 at 0xblablablabla
 
Последнее редактирование:

Dark_Knight

Me, me and me.
Друг
4,078
2,095
CLEO:
{$CLEO .cs}
0000:
REPEAT
   WAIT0
UNTIL 0AFA:  SAMP_IS_READY

while true
wait 0
32@ = 0
    while 32@ < 30000
    wait 0
    end
    0209: 17@ = random_int_in_ranges 200 600
    0AF8: "{FF0000}SCRIPT:{FFFFFF} Funciona!!! \(°o°)/ %d" color -1 params 17@
end
 

Kilowog01

Новичок
Автор темы
6
0
Need use arguments in the string. Some types of arguments is here: http://www.cplusplus.com/reference/cstdio/printf/ (in table).
Opcode 0AF8 has the struct: "string" HEXCOLOR ARGUMENTS

Solution for your problem:
CLEO:
0AF8: "Digit: %d" -1 17@
Thank you guys, now my code works <3
CLEO:
{$CLEO .cs}
0000:
REPEAT
    WAIT 0
UNTIL 0AFA:  SAMP_IS_READY
:script
    WAIT 299000 ms
    0209: 17@ = random_int_in_ranges 200 600
    0AF9: "/Online %d" 17@
    jump @script
0AB2: 0
0B43:
 
Статус
В этой теме нельзя размещать новые ответы.