Jump to content

[HELP] Why this doesn't work


Kazafka

Recommended Posts

  • Moderators
Quote

string.match (s, pattern [, init])

Looks for the first match of pattern in the string s. If it finds one, then match returns the captures from the pattern; otherwise it returns nil. If pattern specifies no captures, then the whole match is returned. A third, optional numerical argument init specifies where to start the search; its default value is 1 and can be negative.

http://www.Lua.org/manual/5.1/manual.html#pdf-string.match

 

Do you want to check is  v not equals player's name?

If yes, you need to do something like this:

for k, v in ipairs(accounts) do
	if v ~= getPlayerName(player) then -- if v not equals player's name
		--some code
	end
end

 

Link to comment
2 minutes ago, stPatrick said:

http://www.Lua.org/manual/5.1/manual.html#pdf-string.match

 

Do you want to check is  v not equals player's name?

If yes, you need to do something like this:


for k, v in ipairs(accounts) do
	if v ~= getPlayerName(player) then -- if v not equals player's name
		--some code
	end
end

 

Yeah, I'll check that.

4 minutes ago, stPatrick said:

http://www.Lua.org/manual/5.1/manual.html#pdf-string.match

 

Do you want to check is  v not equals player's name?

If yes, you need to do something like this:


for k, v in ipairs(accounts) do
	if v ~= getPlayerName(player) then -- if v not equals player's name
		--some code
	end
end

 

However not working BRO

Link to comment

No, but my way to check if v ain't got any player names doesn't just work still, same's your way.

Funny thing is, that earlier at like 12 o'clock am today it worked

6 minutes ago, stPatrick said:

any error?

^

EY PATRICK THAT STARTED CREATING PROBLEMS AGAIN XD

Ok

 

At this case, I will try to write this script up again, tomorrow, to see, what it will be creating.

I regret my choice, to delete older version of script. It was working :''''((( 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...