Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

:match is not a vaild member of player?

Code:

local module = require(game.ServerScriptService.Information)
local http = game:GetService("HttpService")
game.ReplicatedStorage.ClientRemotes.TrelloEventGet.OnServerInvoke = function(url,nocache)
	if url:match("?") then
		return http:GetAsync(url..'&key='..module.Key..'&token='..module.Token,nocache)
	else
		return http:GetAsync(url..'?key='..module.Key..'&token='..module.Token,nocache)
	end
	print("Completed HTTP GET request")
end

game.ReplicatedStorage.ClientRemotes.TrelloEventPost.OnServerInvoke = function(url,data)
	if url:match("?") then
		http:PostAsync(url..'&key='..module.Key..'&token='..module.Token,data)
	else 
		http:PostAsync(url..'?key='..module.Key..'&token='..module.Token,data)
	end
	print("Completed HTTP POST request")
end

I don't understand where a vaild memeber of player is coming from, I was trying to make a little test with this code, and it gives me its not a vaild memeber of player?

print(game.ReplicatedStorage.ClientRemotes.TrelloEventGet:InvokeServer("https://api.trello.com/1/boards/5tuNanLa",true))

The :match() worked with this test

local test = "hi445254353436324"
if test:match("hi")then
	print("works")
end

Anyone have any ideas?

1 answer

✓ Accepted answer

First argument when a player invoke's a server is the player. Make the arguments for each of your functions: (player, url, nocache)

2 comments

0

Thanks for your help! It works now.

0

:-)

This discussion is preserved as it was. New answers, comments, and votes are closed.