Jump to content

help in string


Recommended Posts

Hi all,

I m making this code to create a xml file with a name of a map,

For exemple:

local map = getMapName(source) 
if ( map == "race: firstmap" ) then 
                        xml = xmlCreateFile ("" .. map .. "", "root" ) 
                              xmlSaveFile(xml) 
end 

The problem the xml files cannot created because a letter not neded this [ : ]

how i can delete it by using a code?

Link to comment
local map = getMapName(source) 
if ( map == "race: firstmap" ) then 
                        map = map:gsub("race: ", "") 
                        xml = xmlCreateFile (map .. ".map", "root" ) 
                              xmlSaveFile(xml) 
end 

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