Jump to content

Very noob question...Something like string.delete?


Guest SpitxFirew

Recommended Posts

Posted

I searched google , lua.org , and nothing.

Is there any function to delete characters from a string , in a specified position to another specified position.

Or instead , how to handle all commands in one function , cuz i want to create a XML Multi-Language system , but i can't handle all commands in one , and in wiki says that commandName works that way .

Thanks!

Greets from Chile :)

Posted

There is no string.delete, but you could just use string.sub to get the two substrings around the part you want to remove, and concatenate them to get your new string.

To handle all commands in a single handler, you would use the onConsole event.

Hope any of these help.

Posted

I strongly recommend against using onConsole - use addCommandHandler. This is more efficient and can be restricted with the ACL, plus the players can bind to the commands.

What do you mean by XML Multi-Language system?

Posted

I mean Multi-Language support , readed by XML.

Thanks for your help =D , already did the base , reading , etc. But didn't the command part. :/ . Thanks =)

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