update-router-137
This would update with the router software to computer ID 137, It then send a 'packet' back as follows:
updatereply-router-CODE
I then need to replace "update-reply-router-" with blank so only CODE saves into a file
I have 3 variables as follows
V1
V2
V3
and in the program it seperates them like this from the example 'packet' above
V1 = updatereply
V2 = router
V3 = CODE –this is only the first line of code, so it is basically useless, if I could get the whole code then my problem would be solved :)/>
I tried this:
s = command -- the whole 'packet'
s = s:gsub(V1.."-".."V2.."-"."")
This basically didn't do anything and I tried this too:
s = command -- the whole 'packet'
s = s:gsub(V1,"")
s = s:gsub("-","")
s = s:gsub(V2,"")
s = s:gsub("-","")
this replaces it but leaves y-r-So my question is why dosen't V3 display the whole code, but instead it just displays the first line?
local function Parser()
line = {}
for word in string.gmatch(command, "[^-]+") do
table.insert(line, word)
end
V1 = line[1]
V2 = line[2]
V3 = line[3]
Case()
end