Jump to content




Line thinks it is nil


  • You cannot reply to this topic
6 replies to this topic

#1 Creeper9207

  • Members
  • 211 posts

Posted 08 April 2015 - 09:27 PM

http://pastebin.com/g6tweGV9 - full code
erroring line 8:
local newdata = data:match(":"..":"..file2..":"..":(.+);".."/;"..file2..";"..";"):gsub("=n".."32", " \ ".."n")
thinks its nil.
function activator:
setFileData("nu","nu,","hi")
other note: "nu" is the file's name

i put data in the ::nu::;/;nu;; section, now it just doesnt return anything

#2 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 08 April 2015 - 09:40 PM

What's with the excessive quotes?

local newdata = data:match("::"..file2.."::(.+);/;"..file2..";;"):gsub("=n32", " \ n")

What does it "think is nil"? Are you saying that's what newdata ends up being set to, or...? Where's a sample of "data"?

Edited by Bomb Bloke, 08 April 2015 - 09:41 PM.


#3 Creeper9207

  • Members
  • 211 posts

Posted 08 April 2015 - 09:47 PM

fixed it

and to awnser, im escaping special chars

#4 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 08 April 2015 - 09:55 PM

... no you're not?

But that's a good point, that last one should probably be either "\n" or " \\ n". Not sure what you were going for.

Edited by Bomb Bloke, 08 April 2015 - 09:58 PM.


#5 Creeper9207

  • Members
  • 211 posts

Posted 08 April 2015 - 10:17 PM

=n32, :: ;/; and ;; are special chars

#6 MKlegoman357

  • Members
  • 1,170 posts
  • LocationKaunas, Lithuania

Posted 09 April 2015 - 11:38 AM

Concatenating strings doesn't escape anything. And in what context are those characters special?

#7 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 09 April 2015 - 11:48 AM

In his context.

He's saying he's dividing them up because he wants to.





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users