[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  PHP:table
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

PHP:table

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Shauno   (4 posts)  [Biography] bio
Date Tue 30 Mar 2010 02:35 PM (UTC)
Message
so i'm trying to build a defup table that tracks my defs and puts them up...so far what I have isn't working and the more I try fixing it the more problems that occure.

32:my_defup = {
33: ["free"] = php:Table(),
34: ["balance"] = php:Table(),
35: ["herb"] = php:Table(),
36: ["elixir"] = php:Table()
37:
38: my_defup["free"]["insomnia"] = "insomnia"
39 : }


then to populate these tables I have the following...

my_defup["free"]["insomnia"] = "insomnia"
my_defup["free"]["nightsight"] = "nightsight"
my_defup["balance"]["deathsight"] = "deathsight"
my_defup["elixir"]["speed"] = "sip speed"
my_defup["herb"]["kola"] = "eat kola"
and so on and so forth...

now my problem comes in when I try to populate the tables I get the following error

Compile error
World: shauno
Immediate execution
[string "Script file"]:38: '}' expected (to close '{' at line 32) near 'my_defup'
Error context in script:
34 : ["balance"] = php:Table(),
35 : ["herb"] = php:Table(),
36 : ["elixir"] = php:Table()
37 :
38*: my_defup["free"]["insomnia"] = "insomnia"
39 : }

to me it seems like it can't or it doesn't recognize the } on line 39 and I can't see why. This only happens when I try to populate the tables. The tables themselves don't seem to be the issue as when I save and run it I just get a nil error which is what I make out to be from the unpopulated tables.

Does anyone know what I might be doing wrong here?
[Go to top] top

Posted by Nick Gammon   Australia  (21,607 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Wed 31 Mar 2010 04:11 AM (UTC)
Message
Shouldn't the curly bracket go on line 37, not line 39?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Shauno   (4 posts)  [Biography] bio
Date Reply #2 on Wed 31 Mar 2010 05:45 AM (UTC)
Message
I can't seem to figure out how to go about populating these tables...any suggestions? As everything i've just about tried as failed.
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


2,613 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]