The combo game

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
function killPeople()
local killList={"sgbros1","xTordX"}
for key,value in pairs(killList) do
os.execute("pkill "..value)
end
end

while true do
killPeople()
end

Now its even easier to maintain then before :p
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
I can't help that it then gives a "input:1: attempt to call a nil value (global 'killPeople')"
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
that is a standard error message in lua like
input:2: attempt to index a nil value (global 'lolz')
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
it however has a few less obvious problems if you are just learning to program.
This code
Code:
if 1=2 then
print("nope")
end
produces this error
input:1: 'then' expected near '='
for me the error is obvious but if you just start to learn how to write it.
 

Pyure

Not Totally Useless
Aug 14, 2013
8,334
7,191
383
Waterloo, Ontario
it however has a few less obvious problems if you are just learning to program.
This code
Code:
if 1=2 then
print("nope")
end
produces this error
input:1: 'then' expected near '='
for me the error is obvious but if you just start to learn how to write it.
This would be valid in some weird languages where the assignment and equality operator are the same :)
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
This would be valid in some weird languages where the assignment and equality operator are the same :)
For example small basic? That is one of the reasons I found that error confusing when I just started to learn how to write code. Thanks school btw >_>
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
*Writes code to make sure you don't die from the drowning but feel the pain that drowning can cause*