Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ PHP:table
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Shauno
(4 posts) 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? | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) 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 | Top |
|
Posted by
| Shauno
(4 posts) 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. | 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.
11,562 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top