Quantcast

troubles with msxn and gmatch in plua

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

troubles with msxn and gmatch in plua

Helton Eduardo Ritter
Hello List! Long time no?

I'm making a "vocabulary training", I will import (convert) Parley (
http://edu.kde.org/parley) files and use it at "database" to play in Palm.

Well, I have a trouble with "maxn" and "gmach" in this code (a simplified
version)
http://code.google.com/p/code4funfiles/source/browse/trunk/palm-sdvt/tests/strings_man.lua

Only with Lua code... work fine! See my terminal return

helton@hrnot:/media/SDHELTON/code4fun/palm-sdvt/tests$ lua strings_man.lua
english-portuguese
deutsch-portuguese
helton@hrnot:/media/SDHELTON/code4fun/palm-sdvt/tests$

OK.

Now uncommenting the last 3 lines... compile ok, but if I open a program in
my Palm ..,

"strings_man.lua:24:attemp to call field 'maxn' (a nil value)"

But, if I not use "manxn" function, and set a fixed value... there return
another error at line 28
"strings_man.lua:28:attemp to call field 'gmatch' (a nil value)"

So, I do not know how get the string information that I need (titles,
lessons, and words with translate).

Sugestions?

* I'm reading a "memoDB" the records that begin at "sd#vt"
http://code.google.com/p/code4funfiles/source/browse/trunk/palm-sdvt/main.lua

Many thanks!


[Non-text portions of this message have been removed]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: troubles with msxn and gmatch in plua

Dado Sutter-2-2
Hello pLuers,
   I haven't been using pLua for a loooong time now (but still love it !!!
:) and don't have much time to check it now.
   But it seems that you are using some Lua 5.1 functions, while pLua was
still using Lua 5.0 right ?
   Pls forgive me if I'm completely outdated (because it is true :).

Best
Dado


On Tue, Jan 19, 2010 at 18:24, Helton Eduardo Ritter <[hidden email]
> wrote:

>
>
> Hello List! Long time no?
>
> I'm making a "vocabulary training", I will import (convert) Parley (
> http://edu.kde.org/parley) files and use it at "database" to play in Palm.
>
> Well, I have a trouble with "maxn" and "gmach" in this code (a simplified
> version)
>
> http://code.google.com/p/code4funfiles/source/browse/trunk/palm-sdvt/tests/strings_man.lua
>
> Only with Lua code... work fine! See my terminal return
>
> helton@hrnot:/media/SDHELTON/code4fun/palm-sdvt/tests$ lua strings_man.lua
> english-portuguese
> deutsch-portuguese
> helton@hrnot:/media/SDHELTON/code4fun/palm-sdvt/tests$
>
> OK.
>
> Now uncommenting the last 3 lines... compile ok, but if I open a program in
> my Palm ..,
>
> "strings_man.lua:24:attemp to call field 'maxn' (a nil value)"
>
> But, if I not use "manxn" function, and set a fixed value... there return
> another error at line 28
> "strings_man.lua:28:attemp to call field 'gmatch' (a nil value)"
>
> So, I do not know how get the string information that I need (titles,
> lessons, and words with translate).
>
> Sugestions?
>
> * I'm reading a "memoDB" the records that begin at "sd#vt"
>
> http://code.google.com/p/code4funfiles/source/browse/trunk/palm-sdvt/main.lua
>
> Many thanks!
>
> [Non-text portions of this message have been removed]
>
>  
>


[Non-text portions of this message have been removed]



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/plua/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/plua/join
    (Yahoo! ID required)

<*> To change settings via email:
    [hidden email]
    [hidden email]

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: troubles with msxn and gmatch in plua

Helton Eduardo Ritter
yeah, I was reading Lua 5.1 documentation...

You are right.

At moment.. thanks!

On 1/19/10, Dado Sutter <[hidden email]> wrote:

>
> Hello pLuers,
>    I haven't been using pLua for a loooong time now (but still love it !!!
> :) and don't have much time to check it now.
>    But it seems that you are using some Lua 5.1 functions, while pLua was
> still using Lua 5.0 right ?
>    Pls forgive me if I'm completely outdated (because it is true :).
>
> Best
> Dado
>
>
>
> On Tue, Jan 19, 2010 at 18:24, Helton Eduardo Ritter <
> [hidden email]
> > wrote:
>
> >
> >
> > Hello List! Long time no?
> >
> > I'm making a "vocabulary training", I will import (convert) Parley (
> > http://edu.kde.org/parley) files and use it at "database" to play in
> Palm.
> >
> > Well, I have a trouble with "maxn" and "gmach" in this code (a simplified
> > version)
> >
> >
> http://code.google.com/p/code4funfiles/source/browse/trunk/palm-sdvt/tests/strings_man.lua
> >
> > Only with Lua code... work fine! See my terminal return
> >
> > helton@hrnot:/media/SDHELTON/code4fun/palm-sdvt/tests$ lua
> strings_man.lua
> > english-portuguese
> > deutsch-portuguese
> > helton@hrnot:/media/SDHELTON/code4fun/palm-sdvt/tests$
> >
> > OK.
> >
> > Now uncommenting the last 3 lines... compile ok, but if I open a program
> in
> > my Palm ..,
> >
> > "strings_man.lua:24:attemp to call field 'maxn' (a nil value)"
> >
> > But, if I not use "manxn" function, and set a fixed value... there return
> > another error at line 28
> > "strings_man.lua:28:attemp to call field 'gmatch' (a nil value)"
> >
> > So, I do not know how get the string information that I need (titles,
> > lessons, and words with translate).
> >
> > Sugestions?
> >
> > * I'm reading a "memoDB" the records that begin at "sd#vt"
> >
> >
> http://code.google.com/p/code4funfiles/source/browse/trunk/palm-sdvt/main.lua
> >
> > Many thanks!
> >
>
> > [Non-text portions of this message have been removed]
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>


--
--
Helton Eduardo Ritter
Profile: http://www.google.com/profiles/heltonritter
Site: www.sourcedreams.com.br
Community: www.phpmagazine.org.br


[Non-text portions of this message have been removed]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: troubles with msxn and gmatch in plua

Helton Eduardo Ritter
Wouf!!!! Working now!

Diferences

5.1
http://code.google.com/p/code4funfiles/source/browse/trunk/palm-sdvt/tests/strings_man.lua?r=11

(line 24)  num = table.maxn(str)
(line 28) for title in string.gmatch(str[i], "(%S+-%S+)") do

5.0
http://code.google.com/p/code4funfiles/source/browse/trunk/palm-sdvt/tests/strings_man.lua?r=13

(line 24)  num = table.getn(str)
(line 28)  for title in string.gfind(str[i], "(%S+-%S+)") do

Thanks again !


On 1/19/10, Helton Eduardo Ritter <[hidden email]> wrote:

>
> yeah, I was reading Lua 5.1 documentation...
>
> You are right.
>
> At moment.. thanks!
>
>
> On 1/19/10, Dado Sutter <[hidden email]> wrote:
>>
>> Hello pLuers,
>>    I haven't been using pLua for a loooong time now (but still love it !!!
>> :) and don't have much time to check it now.
>>    But it seems that you are using some Lua 5.1 functions, while pLua was
>> still using Lua 5.0 right ?
>>    Pls forgive me if I'm completely outdated (because it is true :).
>>
>> Best
>> Dado
>>
>>
>>
>> On Tue, Jan 19, 2010 at 18:24, Helton Eduardo Ritter <
>> [hidden email]
>> > wrote:
>>
>> >
>> >
>> > Hello List! Long time no?
>> >
>> > I'm making a "vocabulary training", I will import (convert) Parley (
>> > http://edu.kde.org/parley) files and use it at "database" to play in
>> Palm.
>> >
>> > Well, I have a trouble with "maxn" and "gmach" in this code (a
>> simplified
>> > version)
>> >
>> >
>> http://code.google.com/p/code4funfiles/source/browse/trunk/palm-sdvt/tests/strings_man.lua
>> >
>> > Only with Lua code... work fine! See my terminal return
>> >
>> > helton@hrnot:/media/SDHELTON/code4fun/palm-sdvt/tests$ lua
>> strings_man.lua
>> > english-portuguese
>> > deutsch-portuguese
>> > helton@hrnot:/media/SDHELTON/code4fun/palm-sdvt/tests$
>> >
>> > OK.
>> >
>> > Now uncommenting the last 3 lines... compile ok, but if I open a program
>> in
>> > my Palm ..,
>> >
>> > "strings_man.lua:24:attemp to call field 'maxn' (a nil value)"
>> >
>> > But, if I not use "manxn" function, and set a fixed value... there
>> return
>> > another error at line 28
>> > "strings_man.lua:28:attemp to call field 'gmatch' (a nil value)"
>> >
>> > So, I do not know how get the string information that I need (titles,
>> > lessons, and words with translate).
>> >
>> > Sugestions?
>> >
>> > * I'm reading a "memoDB" the records that begin at "sd#vt"
>> >
>> >
>> http://code.google.com/p/code4funfiles/source/browse/trunk/palm-sdvt/main.lua
>> >
>> > Many thanks!
>> >
>>
>> > [Non-text portions of this message have been removed]
>> >
>> >
>> >
>>
>>
>> [Non-text portions of this message have been removed]
>>
>>
>>
>> ------------------------------------
>>
>> Yahoo! Groups Links
>>
>>
>>
>>
>
>
> --
> --
> Helton Eduardo Ritter
> Profile: http://www.google.com/profiles/heltonritter
> Site: www.sourcedreams.com.br
> Community: www.phpmagazine.org.br




--
--
Helton Eduardo Ritter
Profile: http://www.google.com/profiles/heltonritter
Site: www.sourcedreams.com.br
Community: www.phpmagazine.org.br


[Non-text portions of this message have been removed]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: troubles with msxn and gmatch in plua

Dado Sutter-2-2
Cool ! Bravo ! :)

Best
Dado


On Tue, Jan 19, 2010 at 19:21, Helton Eduardo Ritter <[hidden email]
> wrote:

>
>
> Wouf!!!! Working now!
>
> Diferences
>
> 5.1
>
> http://code.google.com/p/code4funfiles/source/browse/trunk/palm-sdvt/tests/strings_man.lua?r=11
>
> (line 24) num = table.maxn(str)
> (line 28) for title in string.gmatch(str[i], "(%S+-%S+)") do
>
> 5.0
>
> http://code.google.com/p/code4funfiles/source/browse/trunk/palm-sdvt/tests/strings_man.lua?r=13
>
> (line 24) num = table.getn(str)
> (line 28) for title in string.gfind(str[i], "(%S+-%S+)") do
>
> Thanks again !
>
>
> On 1/19/10, Helton Eduardo Ritter <[hidden email]<heltonritter%40gmail.com>>
> wrote:
> >
> > yeah, I was reading Lua 5.1 documentation...
> >
> > You are right.
> >
> > At moment.. thanks!
> >
> >
> > On 1/19/10, Dado Sutter <[hidden email] <dadosutter%40gmail.com>>
> wrote:
> >>
> >> Hello pLuers,
> >> I haven't been using pLua for a loooong time now (but still love it !!!
> >> :) and don't have much time to check it now.
> >> But it seems that you are using some Lua 5.1 functions, while pLua was
> >> still using Lua 5.0 right ?
> >> Pls forgive me if I'm completely outdated (because it is true :).
> >>
> >> Best
> >> Dado
> >>
> >>
> >>
> >> On Tue, Jan 19, 2010 at 18:24, Helton Eduardo Ritter <
> >> [hidden email] <heltonritter%40gmail.com>
> >> > wrote:
> >>
> >> >
> >> >
> >> > Hello List! Long time no?
> >> >
> >> > I'm making a "vocabulary training", I will import (convert) Parley (
> >> > http://edu.kde.org/parley) files and use it at "database" to play in
> >> Palm.
> >> >
> >> > Well, I have a trouble with "maxn" and "gmach" in this code (a
> >> simplified
> >> > version)
> >> >
> >> >
> >>
> http://code.google.com/p/code4funfiles/source/browse/trunk/palm-sdvt/tests/strings_man.lua
> >> >
> >> > Only with Lua code... work fine! See my terminal return
> >> >
> >> > helton@hrnot:/media/SDHELTON/code4fun/palm-sdvt/tests$ lua
> >> strings_man.lua
> >> > english-portuguese
> >> > deutsch-portuguese
> >> > helton@hrnot:/media/SDHELTON/code4fun/palm-sdvt/tests$
> >> >
> >> > OK.
> >> >
> >> > Now uncommenting the last 3 lines... compile ok, but if I open a
> program
> >> in
> >> > my Palm ..,
> >> >
> >> > "strings_man.lua:24:attemp to call field 'maxn' (a nil value)"
> >> >
> >> > But, if I not use "manxn" function, and set a fixed value... there
> >> return
> >> > another error at line 28
> >> > "strings_man.lua:28:attemp to call field 'gmatch' (a nil value)"
> >> >
> >> > So, I do not know how get the string information that I need (titles,
> >> > lessons, and words with translate).
> >> >
> >> > Sugestions?
> >> >
> >> > * I'm reading a "memoDB" the records that begin at "sd#vt"
> >> >
> >> >
> >>
> http://code.google.com/p/code4funfiles/source/browse/trunk/palm-sdvt/main.lua
> >> >
> >> > Many thanks!
> >> >
> >>
> >> > [Non-text portions of this message have been removed]
> >> >
> >> >
> >> >
> >>
> >>
> >> [Non-text portions of this message have been removed]
> >>
> >>
> >>
> >> ------------------------------------
> >>
> >> Yahoo! Groups Links
> >>
> >>
> >>
> >>
> >
> >
> > --
> > --
> > Helton Eduardo Ritter
> > Profile: http://www.google.com/profiles/heltonritter
> > Site: www.sourcedreams.com.br
> > Community: www.phpmagazine.org.br
>
> --
> --
> Helton Eduardo Ritter
> Profile: http://www.google.com/profiles/heltonritter
> Site: www.sourcedreams.com.br
> Community: www.phpmagazine.org.br
>
> [Non-text portions of this message have been removed]
>
>  
>


[Non-text portions of this message have been removed]



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/plua/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/plua/join
    (Yahoo! ID required)

<*> To change settings via email:
    [hidden email]
    [hidden email]

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Loading...