我收到了返回值错误,我不知道我做错了什么。 我不知道哪里有值可以有人帮我?
Function bot_loop()
Dim pointer_to_localplayer As Integer
Dim pointer_to_incross_player As Integer
Dim player_index_incross As Integer
Dim my_team As Integer
Dim incross_team As Integer
While (Not exit_thread)
If triggeron = True Then
ReadProcessMemory(ffa_process(0).Handle, client_dll_base + LocalPlayer_offset, pointer_to_localplayer, 4, 0)
ReadProcessMemory(ffa_process(0).Handle, pointer_to_localplayer + InCross_offset, player_index_incross, 4, 0)
If player_index_incross > 0 And player_index_incross < 65 Then
ReadProcessMemory(ffa_process(0).Handle, pointer_to_localplayer + Team_offset, my_team, 4, 0)
ReadProcessMemory(ffa_process(0).Handle, client_dll_base + EntityList_offset + ((player_index_incross - 1) * &H10), pointer_to_incross_player, 4, 0)
ReadProcessMemory(ffa_process(0).Handle, pointer_to_incross_player + Team_offset, incross_team, 4, 0)
If Not my_team = incross_team Then
mouse_event(&H2, 0, 0, 0, 1)
Threading.Thread.Sleep(15)
mouse_event(&H4, 0, 0, 0, 1)
Threading.Thread.Sleep(10)
End If
End If
Else
End If
Threading.Thread.Sleep(10)
End While
End Function
答案 0 :(得分:5)
你有一个Function
,根据定义它应该返回一个值。如果您不关心返回任何值,请将其更改为Sub
。