Trouble getting started

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Trouble getting started

Phil Bewig-2
I have a new Palm TX, on which I installed Plua 2.0b6.  As a simple
test, I created a memo containing the following text, to print a list
of the first lines of all memos:

    -- db.lua
    f,n = opendb("MemoDB", "r")
    for i = 0, n-1, 1 do
        openrec(f, i)
        s = read(f, "*line")
        print(s)
    end
    closedb(f)

When I try to run the memo, I receive an error message
"memo:/db.lua:3: attempt to call global 'opendb' (a nil value)."

What am I doing wrong?

Phil






 
Yahoo! Groups Links

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

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

Re: Trouble getting started

migueletto
Hi,

> I have a new Palm TX, on which I installed Plua 2.0b6.  As a simple
> test, I created a memo containing the following text, to print a list
> of the first lines of all memos:

> When I try to run the memo, I receive an error message
> "memo:/db.lua:3: attempt to call global 'opendb' (a nil value)."

This program was designed for Plua 1.1. Please check pluadoc.htm for
an example that runs in Plua 2.0.

Regards,
Marcio.






 
Yahoo! Groups Links

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

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

Re: Trouble getting started

Phil Bewig-2
--- In [hidden email], "migueletto" <mmand@...> wrote:
> > I have a new Palm TX, on which I installed Plua 2.0b6.  As a simple
> > test, I created a memo containing the following text, to print a list
> > of the first lines of all memos:
>
> > When I try to run the memo, I receive an error message
> > "memo:/db.lua:3: attempt to call global 'opendb' (a nil value)."
>
> This program was designed for Plua 1.1. Please check pluadoc.htm for
> an example that runs in Plua 2.0.

I was dumb, but now I've got it.  Thanks.  Phil






 
Yahoo! Groups Links

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

<*> 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/