The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: Dko on December 20, 2006, 02:16:18 AM

Title: Need a little help with Speh's Virtual Database v2.01
Post by: Dko on December 20, 2006, 02:16:18 AM
Hey I was wondering could someone help me understand how to use this script. I looked at the header info but what was there didn't seam to work and I asked Seph about it and he said there was some mis information in the header. Also not being the best coder I have a hard time figuring it out looking at just the code.I was told he would be updating this script to be easier to use but id rather not wait if I can help it. Please any help would be greatly appreciated.
Title: Re: Need a little help with Speh's Virtual Database v2.01
Post by: feildmaster on December 20, 2006, 02:21:20 AM
I'll take a lookie and see... n post what i find...
Title: Re: Need a little help with Speh's Virtual Database v2.01
Post by: Dko on December 20, 2006, 03:14:55 AM
Ok thanks. Here it is if you need to see it.
http://www.rmxpu.net/staff/sephirothspawn/One-Winged%20Angel%20Inc/Editor/main.html (http://www.rmxpu.net/staff/sephirothspawn/One-Winged%20Angel%20Inc/Editor/main.html)
Title: Re: Need a little help with Speh's Virtual Database v2.01
Post by: feildmaster on December 20, 2006, 03:36:19 AM
alright so which one did u have a problem with...? each one of them...?

well what you do is copy the script... open the script editor, right click the script box and insert a page and then copy a script per page...
Title: Re: Need a little help with Speh's Virtual Database v2.01
Post by: Dko on December 20, 2006, 06:24:30 AM
I know how to do that just fine. I just can't get the script to work right it self. I do something like this.

randomvar = $game_virtualdb.data_actors
randomvar[1].name
and I get good old errors. Too tired to see what they are right now. I just want to know what im doing wrong from these intructions.

------------------------------------------------------------------------------
# * Instrucions :
#
#   Place The Script Below the SDK and Above Main.
#
#   ** General Guideline For Modifing Database **
#
#   Retrieve Modifed Hash From Virtual Database
#     - object = $game_virtualdb.data_<object>
#
#   Modify the Object (It is a hash, so all properties of hash remain)
#     - object[index] = <something>
#
#   Send Modified Hash Back to Virtual Database
#     - $game_virtualdb.data_<object> = object
#------------------------------------------------------------------------------


P.s this is from the Virtual Database script to answer your question (though its in the title of the thread)
Title: Re: Need a little help with Speh's Virtual Database v2.01
Post by: feildmaster on December 20, 2006, 07:51:15 PM
did you copy the SDK script?
Title: Re: Need a little help with Speh's Virtual Database v2.01
Post by: Me™ on December 20, 2006, 08:02:38 PM
And coul you still give me the error message?
Title: Re: Need a little help with Speh's Virtual Database v2.01
Post by: Dko on December 21, 2006, 03:48:35 AM
Yep SDK is in place and please don't assume im new at coding. As I have lots of experience with C++ and know quite a bit about Ruby. I just have a hard time understand other peoples codes. Especially when its incorrectly documented.  The error I generally get something like this using the example I gave earlier.

NoMethod Error
undefined method 'name' for nil:NilClass

Title: Re: Need a little help with Speh's Virtual Database v2.01
Post by: Blizzard on December 21, 2006, 12:57:58 PM
Post the complete error message. The line that gves the error is vital. That's where the debug starts, lol!
Title: Re: Need a little help with Speh's Virtual Database v2.01
Post by: Dko on December 21, 2006, 03:37:14 PM
In my example it would be randomvar[1].name. Though im not sure why your all asking for the error when I never asked to have the error solved. I know why its coming up. Its because I don't know how to properly use the script. What im asking is how does the Virtual Database work since the instructions are flawed?
Title: Re: Need a little help with Speh's Virtual Database v2.01
Post by: Me™ on December 21, 2006, 04:09:08 PM
Well, apparantly  $game_virtualdb.data_actors is being empty.
Title: Re: Need a little help with Speh's Virtual Database v2.01
Post by: Dko on December 21, 2006, 04:49:15 PM
Im sorry but im really starting to feel like no one is even really reading my posts and its irritating me. I know that its empty. Why I don't know and that most likely can be solved if someone can tell me what Seph didn't explain correctly in his scripts header.
Title: Re: Need a little help with Speh's Virtual Database v2.01
Post by: Me™ on December 22, 2006, 03:13:09 PM
Well, for instance, could you tell me where you did

randomvar = $game_virtualdb.data_actors
randomvar[1].name