iPhone App Directory
RPG Maker VX
 
Gallery Members Search Calendar Help


Welcome Guest ( Log In | Register )

Collapse

>Announcement

Keep an eye out for the upcoming 3rd Quarter Contest!
 
Reply to this topicStart new topic
> Adventures with Reedo's Journal Script, And by adventures, I mean NameErrors.
ProbablyFlashy
post Dec 8 2009, 08:14 AM
Post #1


One girl development team.
Group Icon


Type: Writer
Alignment: Chaotic Neutral




So I'm trying to implement a "folklore feature" in my game, and I'm using Reedo's awesome Journal Script for it. I decided to create an item called the "Folklore Journal" that the player character would carry around. The script is called by a common event that's triggered when the player accesses the journal from the inventory.

But when I test it, I get this error: NameError occured while running script. uninitialized constant Game_Interpreter::Scene_Reedo_Journal.

The common event looks like this, if you're curious.

Spoiler:


Thanks!
Flashy

This post has been edited by ProbablyFlashy: Dec 8 2009, 10:10 AM


--------------------
MY PROJECT:
Go to the top of the page
 
+Quote Post
   
mithos
post Dec 8 2009, 06:34 PM
Post #2


Meowthos the zombie cat!!
Group Icon


Type: Coder
Alignment: Lawful Good




1) have you got the ReedoCommonCode script?
2) Try using a switch to activate the journal rather than the script call (at the top of the script you can assign a switch that activates the journal when you turn it on)

EDIT: 3) isn't the script call meant to be Scene_Reedo_Journal.showjournal Try that

This post has been edited by mithos: Dec 8 2009, 06:35 PM


--------------------
I've been away for a while. Here's my really quite old stuff
Spoiler:


If it's in one of my threads you can use it so long as you read this, and give me a link to any derivatives (i.e. works based off mine). Credit Mithos.
Full legal bit
(Click image for human-readable version :P )
My Stuff:
My Games:
Spoiler:

Story <60%> Mapping<20%> Art<80%> Scripts<97%> Database<50%>
The Legend of Zelda: Restoration of Time Story<20%> Mapping<0%> Art<2%> Scripts<70%> Database<0%>
Absolute Power Story<21%> Mapping<0%> Art<2%> Scripts<0%> Database<0%>

My Sprites:
My Scripts:
I support:
Spoiler:





Go to the top of the page
 
+Quote Post
   
Reedo
post Dec 8 2009, 11:01 PM
Post #3



Group Icon


Type: Coder




Sorry, the naming convention is a little screwy I guess...

Objects which belong to me (are of my creation) have underscores throughout their names. Objects which are new game windows or scenes only have one underscore, following the convention of the base game objects.

Try the code:

Scene_ReedoJournal.show

No underscore in ReedoJournal when referring to the scene or a window.

Also, "show" should be correct method - "showjournal" was used in an earlier version, but the most up to date version uses "show".


--------------------
"Yes, I saw that. You were doing well, until everyone died."
"When you do things right, people won't be sure you've done anything at all."
The Satellite That Collided With God – Futurama

Spoiler:


Go to the top of the page
 
+Quote Post
   
ProbablyFlashy
post Dec 9 2009, 01:59 AM
Post #4


One girl development team.
Group Icon


Type: Writer
Alignment: Chaotic Neutral




I do indeed have the Reedo Common Code script. At least insofar as I remember.

I shall try your suggestion and report back.

Thanks!
Flashy

EDIT: I have not yet tried the using a switch option, however upon renaming the command as Reedo suggested, I got a TypeError on line 194: no implicit conversion from nil to integer.

EDIT 2: If I try to use the switch, I get a NoMethod error on line 515.

This post has been edited by ProbablyFlashy: Dec 9 2009, 02:25 AM


--------------------
MY PROJECT:
Go to the top of the page
 
+Quote Post
   
Reedo
post Dec 9 2009, 03:01 AM
Post #5



Group Icon


Type: Coder




QUOTE (ProbablyFlashy @ Dec 8 2009, 07:59 PM) *
I do indeed have the Reedo Common Code script. At least insofar as I remember.

I shall try your suggestion and report back.

Thanks!
Flashy

EDIT: I have not yet tried the using a switch option, however upon renaming the command as Reedo suggested, I got a TypeError on line 194: no implicit conversion from nil to integer.

EDIT 2: If I try to use the switch, I get a NoMethod error on line 515.


The nil to integer on line 194 would indicate that $game_reedo_journal.selected_index has become 'nil'. Make sure you have a valid selected index.

The error on 515 is a Bug!! Yay!! You win a cookie! (and now I have to post an update to the main thread sad.gif) That line of code is calling the OLD showjournal method. You can fix it by going to line 515 in your script and changing it to just "show" instead of "showjournal".

Of course, you'll still wind up getting the same nil to integer error if the selected_index is nil.




--------------------
"Yes, I saw that. You were doing well, until everyone died."
"When you do things right, people won't be sure you've done anything at all."
The Satellite That Collided With God – Futurama

Spoiler:


Go to the top of the page
 
+Quote Post
   
ProbablyFlashy
post Dec 9 2009, 03:55 PM
Post #6


One girl development team.
Group Icon


Type: Writer
Alignment: Chaotic Neutral




Yay, cookies! (Sorry about the bug, though.)

I'll check what I'm doing as far as the selected index goes.


--------------------
MY PROJECT:
Go to the top of the page
 
+Quote Post
   
Reedo
post Dec 9 2009, 04:03 PM
Post #7



Group Icon


Type: Coder




QUOTE (ProbablyFlashy @ Dec 9 2009, 09:55 AM) *
Yay, cookies! (Sorry about the bug, though.)

I'll check what I'm doing as far as the selected index goes.


lol, thats ok - I need to make a whole new demo anyway - the one that is out there is garbage and I found out there's errors in a development script which kill battles in the demo. I need to get my WIP scripts out of the demo (and make a REAL demo! lol one with some actual content to it).

If you can't find anything messing up the selected_index, you can send me your script (if you want) and I'll take a look at what you're doing.


--------------------
"Yes, I saw that. You were doing well, until everyone died."
"When you do things right, people won't be sure you've done anything at all."
The Satellite That Collided With God – Futurama

Spoiler:


Go to the top of the page
 
+Quote Post
   
ProbablyFlashy
post Dec 9 2009, 04:05 PM
Post #8


One girl development team.
Group Icon


Type: Writer
Alignment: Chaotic Neutral




It doesn't look like anything is missing in the selected index. I haven't even really started tweaking the script yet so it looks an awful lot like the version that came with the demo.

I could, of course, just be retarded and making a really obvious mistake that everyone but me notices. lol.

EDIT: Reedo, I've pm'd you what the script looks like since I've started tweaking it.

This post has been edited by ProbablyFlashy: Dec 9 2009, 04:14 PM


--------------------
MY PROJECT:
Go to the top of the page
 
+Quote Post
   
Reedo
post Dec 9 2009, 05:24 PM
Post #9



Group Icon


Type: Coder




QUOTE (ProbablyFlashy @ Dec 9 2009, 10:05 AM) *
It doesn't look like anything is missing in the selected index. I haven't even really started tweaking the script yet so it looks an awful lot like the version that came with the demo.

I could, of course, just be retarded and making a really obvious mistake that everyone but me notices. lol.

EDIT: Reedo, I've pm'd you what the script looks like since I've started tweaking it.


Ok, I replied to Flashy's message. For anyone reading this, the main thing is that tweaking the journal script isn't really necessary. All you really need to do is setup a control script to build a new journal.

But in creating an example, I found another logic issue where the text files aren't loading properly if there is not a control script also loading journals... so it looks like I've got another bug to squash. The workaround is to always have a control script create the same journal names registered in an import text file. Then the files will import entries into the matching journal names created via script. Since the bug isn't completely breaking, I will probably wait to address it with the other bug Flashy found when I release the new demo.

This post has been edited by Reedo: Dec 9 2009, 05:25 PM


--------------------
"Yes, I saw that. You were doing well, until everyone died."
"When you do things right, people won't be sure you've done anything at all."
The Satellite That Collided With God – Futurama

Spoiler:


Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 24th July 2014 - 05:12 AM

RPGMakerVX.net is an Privacy Policy, Legal.