Jump to content




")" expected :2:


  • This topic is locked This topic is locked
4 replies to this topic

#1 ETHANATOR360

  • Members
  • 423 posts
  • Locationyour hardrive

Posted 16 September 2012 - 11:27 PM

-snip-

#2 Grim Reaper

  • Members
  • 503 posts
  • LocationSeattle, WA

Posted 16 September 2012 - 11:46 PM

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! :)/>

#3 MysticT

    Lua Wizard

  • Members
  • 1,597 posts

Posted 16 September 2012 - 11:47 PM

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")]])


#4 cant_delete_account

  • Members
  • 484 posts

Posted 17 September 2012 - 02:15 AM

View PostMysticT, on 16 September 2012 - 11:47 PM, said:

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")')
:)/>

#5 FuzzyPurp

    Part-Time Ninja

  • Members
  • 510 posts
  • LocationHarlem, NY

Posted 17 September 2012 - 03: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.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users