Hi, I need your help with the following script:
The test.ini file:
When I type /test 2 it should show on the chat "Text: Text2". But instead it crashes.
Code:
{$CLEO .cs}
0000:
repeat
wait 0
until 0AFA: samp_is_ready
0B34: samp register_client_command "test" to_label @99
:98
wait 0
jump @98
:99
wait 0
6@ = File.Open("cleo\test.ini", "rt")
else_jump @100
wait 0
jump @99
:100
wait 0
alloc 8@ 260
Samp.IsCommandTyped(0@)
if
0AD4: 11@ = scan_string 0@ format "%d" 13@
else_jump @103
:101
wait 0
repeat
File.ReadString(6@, 8@, 260)
0AD4: 14@ = scan_string 8@ format "%d" 15@
until 003B: 13@ == 15@
File.ReadString(6@, 8@, 260)
0AF4: 16@ = scan_string 8@ format "%s" 17@
if
not 17@ == ""
else_jump @102
chatmsg "Text: %s" -1 17@
:103
wait 0
free 6@
File.Close(6@)
Samp.CmdRet
Code:
1
Text1
2
Text2
3
Text3