When ever I try this code, it always errors with startup: 95: bad argument #1: value expected. It is weird, because I try/define everything and then when it gets to this pcall statement, it errors on me.
Installer (Beta)
pastebin get 2LVGRcKi install
PS: Debug prints is what I use to debug, don't hate me! XD
Edit: Oh ya, the code.
https://github.com/M...ob/beta/startup
pcall: bad argument #1: value expected?
Started by MudkipTheEpic, May 14 2013 08:58 PM
6 replies to this topic
#1
Posted 14 May 2013 - 08:58 PM
#2
Posted 15 May 2013 - 12:41 AM
I think you didn't declare the "func" function.
#3
Posted 15 May 2013 - 02:01 AM
Mackan90096, on 15 May 2013 - 12:41 AM, said:
I think you didn't declare the "func" function.
#4
Posted 15 May 2013 - 08:44 AM
I print the type of the func function, it prints function.
And even if you put pcall(lolololololrotortlotlrtlorto) in the LUA prompt it doesn't say that, only when you put pcall().
Edit: Nevermind, fixed the problem.
And even if you put pcall(lolololololrotortlotlrtlorto) in the LUA prompt it doesn't say that, only when you put pcall().
Edit: Nevermind, fixed the problem.
#5
Posted 15 May 2013 - 09:38 AM
what was the problem? I be curious
#6
Posted 15 May 2013 - 05:53 PM
Apparently, in loadfile, if the file has a syntax error, it returns a function with no value? I don't think it actually works that way, or .OSRunner/Boot/startup had a weird problem on line 95. (But when I changed the line on the regular /startup, it also changed the line in the error to the line with that same code.)
I think that it was just a mistake on my part.
I think that it was just a mistake on my part.
#7
Posted 15 May 2013 - 06:56 PM
heh. I just realized that it was not pcall that was causing that issue... it was setfenv lol, loadstring returned nil which caused setfenv to error before pcall even ran
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











