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

Can't find why this error occurs?

Asked by
Muoshuu 580 Moderation Voter
8 years ago

It is a very long script though you only need to read a maximum of 30 lines... (Please excuse how messy it is...)

Code

Errors occur on line 126, 117, and 50 (That I know of)

Apparently, those specific functions think that the function 'GetPlayerData' (On line 58) is nil, even though my tests prove otherwise.

The error occurs only in Online Mode, it works perfectly fine in solo...

1 answer

Log in to vote
0
Answered by
adark 5487 Badge of Merit Moderation Voter Community Moderator
8 years ago

What's likely going on is the code is trying to call the function before it gets defined. The easiest way to get around this in a Table is to wait for the member to exist:

repeat wait() until (Self.RemoteFunctions and Self.RemoteFunctions.GetPlayerData)
0
The functions already only run after everything has been defined. Thanks for being the only one to answer after 13 hours though. Muoshuu 580 — 8y
Ad

Answer this question