Jump to content

string.find problem


Tockra

Recommended Posts

Posted

string.find looks for patterns. If you don't want it, just turn it off (4th parameter).

string.find (s, pattern [, init [, plain]])

...A value of true as a fourth, optional argument plain turns off the pattern matching facilities, so the function does a plain "find substring" operation, with no characters in pattern being considered "magic". Note that if plain is given, then init must be given as well.

Posted

Because that dont run ...

false is advanced setting...

Other question, cant i use getPlayerNametagText for that?

€: That run :

..or string.find(playerN,"[abc]",1,true

but i dont know why xD

Posted

Yes, you can, but you should use getPlayerName instead.

string.find( getPlayerName( player ), "[abc]", 1, true );

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...