Skip to content

Commit

Permalink
fix mistake in networking receive
Browse files Browse the repository at this point in the history
  • Loading branch information
EvaisaDev committed Jul 2, 2024
1 parent c23c23a commit d92dd55
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion evaisa.mp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ function HandleMessage(v, ignore)
lobby_gamemode.message(lobby_code, data, v.user)
end

if (data[1] and type(data[1]) == "string" and data[2]) then
if (data[1] and type(data[1]) == "string" and data[2] ~= nil) then
if(bytes_received_per_type[data[1]] == nil)then
bytes_received_per_type[data[1]] = 0
end
Expand All @@ -651,6 +651,7 @@ function HandleMessage(v, ignore)
end
else
print("Invalid message: "..tostring(data))
print(inspect(data))
end
end

Expand Down

0 comments on commit d92dd55

Please sign in to comment.