Database Help

icesteruk
Posts: 287
Joined: Sun Jan 20, 2013 9:16 pm

Re: Database Help

Post by icesteruk »

well I copied and pasted the above link as posted and it didnt give no errors... :/

icesteruk
Posts: 287
Joined: Sun Jan 20, 2013 9:16 pm

Re: Database Help

Post by icesteruk »

AHHH Seems the resetProfile() thing didnt make it work but hard rebooting did finally work!

But seems its not saving ... This is ... I'm just going to go back to the normal variable way.. as its way less stressful and does the same job!

Example of it still not working:
Code: [show] | [select all] lua
lua listStatuses()

        Known Statuses
==================================
Name           Status    Class
Kerryn         Living    Unknown
Valingar       Living    Unknown
==================================
lua getStatus("Batman")
"Unknown"

lua setStatus("Batman", "living")
Batman set to Living
lua getStatus("Batman")
"Unknown"

lua listStatuses()

        Known Statuses
==================================
Name           Status    Class
Kerryn         Living    Unknown
Valingar       Living    Unknown
==================================
lua setClass("Batman", "monk")
Batman set to Monk
lua listStatuses()

        Known Statuses
==================================
Name           Status    Class
Kerryn         Living    Unknown
Valingar       Living    Unknown
==================================

icesteruk
Posts: 287
Joined: Sun Jan 20, 2013 9:16 pm

Re: Database Help

Post by icesteruk »

I think I found the issue, the database itself is not working and the script before doesnt help as it still doesnt work after doing what it says... :/ Guess I'll wait for the new release whenever that might be!

User avatar
keneanung
Site Admin
Posts: 94
Joined: Mon Mar 21, 2011 9:36 am
Discord: keneanung#2803

Re: Database Help

Post by keneanung »

Ok, so let me get this straight.

1.) You added the db things as a script to Mudlet, loading before you do these calls to you functions?
2.) You somehow got some data added to the database (external programI assume?) and can read it?
3.) after using setStatus("Batman", "living") it's still the same data as before.

If those three points above are correct, I can try and reproduce the error again. Because if point 1 is true, we still seem to have bugs.

icesteruk
Posts: 287
Joined: Sun Jan 20, 2013 9:16 pm

Re: Database Help

Post by icesteruk »

I added 1) twice... and the 2nd time it worked, then stopped again..

I knw it worked as it wasn't showing any information then it started to show information (robin an joker) so I did setStats("BAtman", "living") again and then it didnt show batman, but it still showed the other two...

Sorry for confusion but im really confused as to why it wouldn't work (wthout showing errors) then work, then suddenly stop but still show information... :/
also the result = thing you said to do in an alias, didnt work either

User avatar
keneanung
Site Admin
Posts: 94
Joined: Mon Mar 21, 2011 9:36 am
Discord: keneanung#2803

Re: Database Help

Post by keneanung »

Another idea: Did you keep the second set of curly brackets around the changed in merge_unique?

I will try to reproduce the error later and get back to you afterwards.

User avatar
keneanung
Site Admin
Posts: 94
Joined: Mon Mar 21, 2011 9:36 am
Discord: keneanung#2803

Re: Database Help

Post by keneanung »

I just tried it and it works for me. Try the script I attach to this post.

What got me for a moment, was the thing I already mentioned: db:merge_unique() expects a table of data sets and not single data sets.
Attachments
MergeUniqueWorkingProof.zip
Demo for db:merge_unique
(18.15 KiB) Downloaded 275 times

icesteruk
Posts: 287
Joined: Sun Jan 20, 2013 9:16 pm

Re: Database Help

Post by icesteruk »

keneanung wrote:I just tried it and it works for me. Try the script I attach to this post.

What got me for a moment, was the thing I already mentioned: db:merge_unique() expects a table of data sets and not single data sets.
I already rewrote it with variables and it works fine.. :/ Dont fancy breaking it but will test it on a new profile later this week

Thanks

Post Reply