Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[SOLVED] Workspace.Manage.RoomCheck:10: attempt to call global 'check' What's going on?

Asked by 6 years ago
Edited 6 years ago

My script spits out Workspace.Manage.RoomCheck:10: attempt to call global 'check' (a nil value) What's going on?

Here's my code

01-- Room Checker Script
02local boardRooms = game.Workspace.Manage.SurfaceGui.Rooms
03local roomDbase = game.ReplicatedStorage.RoomDatabase.Standard
04Ok = Color3.new(0, 184, 6)
05Ta = Color3.new(184,0,0)
06 
07repeat
08  wait(15)
09  -- Normal Rooms
10  check("101")
11  check("102")
12  check("103")
13  check("104")
14  check("105")
15  check("106")
View all 55 lines...
0
is check even a thing? i never heard of it, mayb thats whats wrong and its probarly considering it nil thats why starmaq 1290 — 6y
0
Yea i just checked it gave me same error, that's cuz check() isnt a thing? what r u doing? starmaq 1290 — 6y
0
check is a function. Look down in the code. It starts at line 44 BenjySmb 16 — 6y
0
ohh sorry i thought it wasa lua function :facepalm: lol i suck sorry starmaq 1290 — 6y
View all comments (6 more)
0
this script is not working cuz youre assigning the function, or we can say creating it after it being called starmaq 1290 — 6y
0
move your function creation part of the script all the way to the top, and see if it works starmaq 1290 — 6y
0
for the script, check isnt a thing yet, remember that your computer reads the script line by line, you were calling the function before assigning it starmaq 1290 — 6y
0
fixed? starmaq 1290 — 6y
0
did i help? starmaq 1290 — 6y
0
rude.. starmaq 1290 — 6y

1 answer

Log in to vote
0
Answered by
clc02 553 Moderation Voter
6 years ago

You probably figured it out, but if you don't want to put the function in a certain order you can also put at the top of script

1local check

So long as you finish defining it before you end up calling it. You can do that with your script by enclosing the lines 2 to 41 in a function and calling that function as the very last line of the script

Ad

Answer this question