Hi, I need some help here.
I have tried to learn some LUA and I'm still a huge newbie.
What I'm trying to do is to send a text to the variable(or whatever it called) client, which I later on will use in a text message like this =
user:SendData(Bot,"Message"..client..".")
I probably made a huge mistake, but whats wrong with my DataArrival ?
client=""
function DataArrival( user , data )
if strsub(data, 1,3) == "<++" then
Client=="Original DC++"
return 1
elsif strsub(data, 1,2) == "<0" then
Client="oDC"
return 1
end
end
simplest way to do:
Client=""
function DataArrival( user , data ) -- when a data arrives
if strsub(data, 1, 7) == "$MyINFO" then -- check if its a myinfo string, and if so then
if strfind(data, "<++") then -- if this found, then
Client=="Original DC++"
elseif strfind(data, " Client="oDC"
end
end
end
Beawre: Client and client arent the same variables, as LUA is case sensitive.