419 posts
Location
your hardrive
Posted 17 September 2012 - 12:27 AM
-snip-
504 posts
Location
Seattle, WA
Posted 17 September 2012 - 12:46 AM
When you write a line using a quote, the interpreter will automatically look for the next quote to end the string, and anything in between those two quotes is textual data. To prevent this, you'll need to use different means of writing quotes within quotes.
You could try '' or [[ ]] to achieve what you're looking to do.
Here is a solution using '':
startup.writeLine ('shell.run("virus")')
Here is a solution using [[ ]]:
startup.writeLine ([[shell.run("virus")]])
Hope I helped! :)/>/>
1604 posts
Posted 17 September 2012 - 12:47 AM
You have to escape quotes inside a string (or use single quotes, or multiline strings), otherwise it will think the string ends.
startup.writeLine("shell.run("virus")")
-- or
startup.writeLine("shell.run('virus')")
-- or
startup.writeLine([[shell.run("virus")]])
474 posts
Posted 17 September 2012 - 03:15 AM
You have to escape quotes inside a string (or use single quotes, or multiline strings), otherwise it will think the string ends.
startup.writeLine("shell.run("virus")")
-- or
startup.writeLine("shell.run('virus')")
-- or
startup.writeLine([[shell.run("virus")]])
Or:
startup.writeLine('shell.run("virus")')
:)/>/>
496 posts
Location
Harlem, NY
Posted 17 September 2012 - 04:02 AM
Please do not post malicious code on the forums.
You've been here long enough to follow forum rules and guidelines.
Thread Locked.