Closed tz1epiczzz closed 2 years ago
it was working fine no problems then we did a restart this morning and suddenly get this error and we do not know why this is what people who are in the discord and are whitelisted get [ script:DiscordWhitel] SCRIPT ERROR in event `playerConnecting': TypeError: Cannot read property 'indexOf' of null [script:DiscordWhitel] > getUserDiscord (@DiscordWhitelist/server.js:50) [script:DiscordWhitel] > (@DiscordWhitelist/server.js:57)
Replace the for loop with for (let i = 0; i < GetNumPlayerIdentifiers(source); i++) { const identifier = GetPlayerIdentifier(source, i); if (identifier.includes('discord:')) return identifier.replace('discord:', ''); }
New version releasing :)
it was working fine no problems then we did a restart this morning and suddenly get this error and we do not know why this is what people who are in the discord and are whitelisted get [ script:DiscordWhitel] SCRIPT ERROR in event `playerConnecting': TypeError: Cannot read property 'indexOf' of null [script:DiscordWhitel] > getUserDiscord (@DiscordWhitelist/server.js:50) [script:DiscordWhitel] > (@DiscordWhitelist/server.js:57)