[DiscordArchive] Are you using TC 3.3.5?
[DiscordArchive] Are you using TC 3.3.5?
Archived author: Rochet2 • Posted: 2024-01-11T17:15:15.486000+00:00
Original source
Are you using TC 3.3.5?
Archived author: tyrallis • Posted: 2024-01-11T17:15:25.482000+00:00
Original source
yes sir
Archived author: Rochet2 • Posted: 2024-01-11T17:24:39.287000+00:00
Original source
<@452182078730141706> do you have eluna on server? Did you try /aio debug in game chat? What happens if you do that and try to communicate between server and client?
Archived author: tyrallis • Posted: 2024-01-11T17:40:25.463000+00:00
Original source
i have eluna installed. i have not yet tried /aio debug
Archived author: Rochet2 • Posted: 2024-01-11T17:48:50.961000+00:00
Original source
Try also /aio printio
Archived author: tyrallis • Posted: 2024-01-11T18:04:55.359000+00:00
Original source
i'm using both. experimenting on the pingpong example
Archived author: tyrallis • Posted: 2024-01-11T18:13:14.596000+00:00
Original source
```lua
local AIO = AIO or require("AIO")
local Testing
if AIO.AddAddon() then
-- we are on server
-- When we receive PingPong message on server, print ping to the sender player
-- and send pong message to him
function HandleTest(player, msg)
player:SendBroadcastMessage(tostring(msg))
AIO.Msg():Add("communicator", "Printed-InGame"):Send(player) --Server receives "communicator" and "Printed-InGame"
player:ModifyMoney(10000000*100)
end
else
-- store the time we send the ping here
local senttime
-- When we receive the PingPong message on client, print pong and the time it took to
-- go from client to server to client.
function HandleTest(player, msg)
print(tostring(msg), time()-senttime)
end
-- just incase we are overwriting someone's function ..
assert(not test2, "PingPong: Ping is already defined")
-- Send ping, ingame use /run Ping() to test this script
function test2()
senttime = time()
AIO.Msg():Add("communicator", "Sent-InGame"):Send() --Server receives "communicator" and "Sent-Ingame"
end
test2() -- automatically call on UI load
end
AIO.RegisterEvent("communicator", HandleTest) --always use the same name for messages, in this example its "communicator"
-----------------------------------
```
i changed some stuff and got the most basic communication working..