+ 2
Can someone tell me what is wrong with my code?
def command==input\n if command==list("") puts"list:root,hack,Iplookup" elsif command == "root" puts "Rooting android phone.\n" puts "Please wait\n" puts "Your phone is rooted" elsif command == "hack" puts "Hacking protocol...\n" puts "Footprinting\n" puts "ACESS GRANTED" elsif command == "IPlookup" puts "Looking up IP..." puts "Your IP is..." puts "123.456.789" end
12 Antworten
+ 2
Petar Bubalo Sorry was busy. Did you get your code to work?
I tried to change some parts and it turned out fine.
https://code.sololearn.com/cdy20QQHyNDT/?ref=app
+ 1
There should be 2 "end" keywords, one for the if statement, one for the function definition
+ 1
Petar Bubalo what is input\n ? If you're prompting input from user, use "gets" instead.
+ 1
Petar Bubalo Is what you posted the entire code? Try setting a new name for your function and call it later. Naming a function by assigning variable is a bit confusing.
+ 1
Ok
+ 1
Yes, i named my variable var
+ 1
I added engage and connect
0
I tried
0
I'll try
0
Gets is right, but there are another errors
0
Do i need class
0
It's very confusing