problem with dots in lua

Discussions about ET modding (sdk code, player/weapon modeling)

Moderators: Forum moderators, developers

Post Reply
User avatar
Luk4ward
Posts: 236
Joined: Sun Jul 30, 2006 1:55 pm
Location: Poland
Contact:

problem with dots in lua

Post by Luk4ward »

file: 83.5..dat gives: len = -1
string.gsub(ip, ".", "_") gives: _____ for 83.5. etc.

-.-'
wolFTeam.pl
User avatar
ReyalP
Posts: 1663
Joined: Fri Jul 25, 2003 11:44 am

Re: problem with dots in lua

Post by ReyalP »

Luk4ward wrote:file: 83.5..dat gives: len = -1
string.gsub(ip, ".", "_") gives: _____ for 83.5. etc.

-.-'
this is correct: http://www.lua.org/manual/5.0/manual.html#pm
send lawyers, guns and money
User avatar
Luk4ward
Posts: 236
Joined: Sun Jul 30, 2006 1:55 pm
Location: Poland
Contact:

Re: problem with dots in lua

Post by Luk4ward »

ReyalP wrote:
Luk4ward wrote:file: 83.5..dat gives: len = -1
string.gsub(ip, ".", "_") gives: _____ for 83.5. etc.

-.-'
this is correct: http://www.lua.org/manual/5.0/manual.html#pm
thx, already tried with success: string.gsub(ip2, "(%p+)", "_")

btw lua cant read filenames with dots inside?
wolFTeam.pl
User avatar
ReyalP
Posts: 1663
Joined: Fri Jul 25, 2003 11:44 am

Re: problem with dots in lua

Post by ReyalP »

Luk4ward wrote: btw lua cant read filenames with dots inside?
Are you using lua IO or game FS ? If the latter, I'd guess it's a limit of the game filesystem. I'd be very surprised if lua cared.
send lawyers, guns and money
User avatar
Luk4ward
Posts: 236
Joined: Sun Jul 30, 2006 1:55 pm
Location: Poland
Contact:

Re: problem with dots in lua

Post by Luk4ward »

ReyalP wrote:
Luk4ward wrote: btw lua cant read filenames with dots inside?
Are you using lua IO or game FS ? If the latter, I'd guess it's a limit of the game filesystem. I'd be very surprised if lua cared.
game fs. I see, thx for replies
wolFTeam.pl
Post Reply