This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
RadiationAlert's profile picture

Startup error

Started by RadiationAlert, 19 April 2016 - 07:58 PM
RadiationAlert #1
Posted 19 April 2016 - 09:58 PM
So I can't figure out why it is doing this: bios:14: [string "startup"]:23: function arguments expected
I've put in "breakpoints" to try and isolate the problem and I can't figure out what is causing it.


local PullEvent = os.pullEvent;
os.pullEvent = os.pullEventRaw;
local Credentials = {"admin", "password"}
term.clear ();
term.setCursorPos (1, 1);
print ("Login System Version 1.2 Client to Client Mode Loaded");
print ("Please provide valid login credentials to continue...");
write ("Username: ");
local Username = read ();
write ("\nPassword: ");
local Password = read ("*");
if (Username == Credentials[1] and Password == Credentials[2]) then
write ("\nAccess Granted...");
sleep (0.25);
term.clear ();
term.setCursorPos (1, 1);
print ("Welcome "..Credentials[1].."!"):
os.pullEvent = PullEvent;
shell.setAlias ("cls", "clear");
else
write ("\nAccess Denied...");
sleep (0.25);
shell.run ("startup");
end
KingofGamesYami #2
Posted 19 April 2016 - 10:07 PM
After print( "Welcome .. Crednetials[ 1 ] .. "!") your semicolon is a colon.
RadiationAlert #3
Posted 19 April 2016 - 10:14 PM
It's small things like that that I never notice.
Edited on 19 April 2016 - 08:15 PM
KingofGamesYami #4
Posted 19 April 2016 - 10:17 PM
Don't use semicolons - then you won't have to notice.
RadiationAlert #5
Posted 19 April 2016 - 10:33 PM
C# gives me that habbit