Modern Algebra's Quest Journal issue

Joined
Sep 15, 2017
Messages
63
Reaction score
13
First Language
Telepathy
Primarily Uses
RMVXA
I have placed Modern Algebra's script for the Quest Journal in the correct slot and it works perfectly.
However, when I refer to an item id (028), I get an error message (invalid octal digit).

when 2 # Quest 2 - Ms Fisher's Fish
q[:name] = "Fish for the Inn"
q[:icon_index] = 028

I have already tried inserting the number as a string and getting rid of the zero but the program crashes.
I'm very new to 'ruby so can anyone tell me how to fix it?
Thank you in advance!
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA

I've moved this thread to RGSSx Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
What is the exact error you get and on which line in the script?
When does the error pop up?

You should never use leading zeros anywhere in scripts (or anywhere for that matter, I don't understand why people use them at all o_O).
 
Joined
Sep 15, 2017
Messages
63
Reaction score
13
First Language
Telepathy
Primarily Uses
RMVXA
Hi Sixth, if you look at my original post I did a cut and paste of the input.
How can I not put a zero in the script to call an item whose id n is 028?
I had no problem with other numbers starting with 0 which are not considered: INVALID OCTAL DIGIT - because octals do not contain a 8 or a 9.

This is the message error that I get:

Script "Quest Journal" line 794: SintaxError occured.

Invalid octal digit

q[icon:index] = 028

The items listed in the database start with 001 and so on so these are not numbers that can be altered as far as I understand.
I don't want to just put the items in numbers which are considered octal and leave blanks in the item database because that wouldn't make
any sense.

Please forgive me I'm very knew to Ruby and I cannot work this out by myself without your help.
Thank You!
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
Those are listed that way because reasons. :D
I can't find any reasons for it though.
Point is, in scripts, where it is pure code and not aesthetics, you should never use leading zeros anywhere.
So, if you see leading zeros used on an interface somewhere (like in the database editor at many places), and a script tells you to use the ID or index of something, you leave out those leading zeros.

According to the help files:
0377
0o377

octal integer

Which means that is how you explicitly state that you will use an octal integer.
I didn't even know that you can state this just by using a single leading zero, I only knew about the second method. :D

Anyway, since octal integers don't have 8 in them, 028 really is an "invalid octal digit".
Just let loose of that leading zero and it should work. And make sure you do this for every single setting you used leading zeros in.
 
Joined
Sep 15, 2017
Messages
63
Reaction score
13
First Language
Telepathy
Primarily Uses
RMVXA
Yes, I tried to write the number without the zero but the program crashes. Also because the number I input is a reference
number to call an item in the list and not part of the core program written by Modern Algebra..
Anyway, thanks, I'll try to contact Modern Algebra if anyone knows how to contact him. His website hasn't been active for a few years.
His script is perfect so I'm sure there is a simple solution for this.
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
All IDs are always simple numbers without leading zeroes, the zeroes are just in the display in the editor for readability and Format reasons. Even in show text with textcodes that need IDs it is better to write them without leading zeroes.

So you have to remove the zero - and if there is an other error or crash after solving the octal error, then you need to find that other error as the next step, not reimplementing the first error to hide the second.

So please post a screenshot of the new error after you solved this one to get more help.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,660
Reaction score
563
First Language
English
Primarily Uses
RMVXA
Yes, I tried to write the number without the zero but the program crashes. Also because the number I input is a reference
number to call an item in the list and not part of the core program written by Modern Algebra..
Anyway, thanks, I'll try to contact Modern Algebra if anyone knows how to contact him. His website hasn't been active for a few years.
His script is perfect so I'm sure there is a simple solution for this.
Whats the error when it crashes? The leading 0 is not required as sixth said. I have had no problems with the script.
 
Joined
Sep 15, 2017
Messages
63
Reaction score
13
First Language
Telepathy
Primarily Uses
RMVXA
Ok! I've followed your instructions and removed the zeros from the quests.
So far, I've inserted the data for two quests: the first one works perfectly but the second one
gives me an error half way through.
Removing the zeros works because the first quest is working - but it was working with the zero as well... (valid octal).
Please have a look at the data I inserted for both of the quests:

when 1 # Quest 1 - Mr Daisy
q[:name] = "Ibericus Flowers"
q[:icon_index] = 23
q[:description] = "Collect 4 ibericus flowers that can be found in a damp area in the South East for Mr Daisy in the market. Make sure you have a rope."
q[:objectives][0] = "Get 4 Ibericus flowers for Mr Daisy at the market"
q[:custom_categories] = []
q[:banner] = ""
q[:banner_hue] = 0
q[:client] = "Mr Daisy"
q[:location] = "Green Planet, Market"
q[:common_event_id] = 0
q[:rewards] = []
q[:layout] = false

when 2 # Quest 2 - Ms Fisher's Fish
q[:name] = "Fish for the Inn"
q[:icon_index] = 28
q[:description] = "Deliver the fresh fish to the Inn. Receive 100 coins, give it to Ms Fisher and she'll pay you 40."
q[:objectives][0] = "Take the fresh fish to Mr Argh at the inn. Receive the payment and take it back to Ms Fisher. "
q[:custom_categories] = []
q[:banner] = ""
q[:banner_hue] = 0
q[:client] = "Ms Fisher"
q[:location] = "Green Planet, Inn"
q[:common_event_id] = 0
q[:rewards] = []
q[:layout] = false

I have included the error as an attachment.
Thanks a lot in advance!
 

Attachments

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
The first quest worked because 23 as octal digit is indeed valid, but 28 is not (octal numbers can only contain numbers from 0 to 7).

The error you get now (which is not even close to the octal error you got before) indicates that you used a script call which misses an argument.
In other words, it is the script call you use which is not correct. Recheck the script call you used for typos and/or other errors.
You can also show us the exact script call you used and we might be able to tell you the cause of the error.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,660
Reaction score
563
First Language
English
Primarily Uses
RMVXA
which line is 1411? I don't understand the octal error as I never encountered this. The icon index should be any number from your icon sheet. I have quests with numbers in the 14000's.
This error is saying that you have something with 2 parameters not 1. We need to see the script calls.
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
The error with "Line 1411 in Game_Interpreter" always means that it is triggered by a script call (the method for executing the script call itself is defined in that class on that line).
This does not necessarily mean that the error's origin is in that script or in the script call used, but most of the time it is just a wrongly used script call or typos in the script call (and I suspect that that is the case here too).

That octal digit issue can be forgotten, this new one got nothing to do with that.
 
Joined
Sep 15, 2017
Messages
63
Reaction score
13
First Language
Telepathy
Primarily Uses
RMVXA
Thank you guys! You are very quick!
As I am no expert in programming with Ruby and so far I've only inserted the data for two quests, I think I should just
delete the actual Quest Journal script and replace it with a new one... I might have typed somewhere else by accident
and it would take me ages to find the error. I'll let you know if it works!
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
Have you checked the script call you used?
The error happens when you interact with an event (or during it). Check the last event you triggered before the error and show us that event, more specifically, all of the script calls you used in it.
In case you don't know what exactly "script call" means, it is the event command named "Script..." in the event editor. One of these commands trigger the error you get, and not the quest system script itself.

In case you edited something in the actual quest system script itself (aside from the marked editable areas), reinstall the script (delete the edited one and add the original one) and see if it works after.
If you did not edit the script where you weren't supposed to, than the issue is definitely coming from a script call you used in the last triggered event.
 
Joined
Sep 15, 2017
Messages
63
Reaction score
13
First Language
Telepathy
Primarily Uses
RMVXA
I've found the error. Sixth, you were right!
In the event script I wrote reveal_quest instead of reveal_objective.
That was it!
I apologize for troubling you and I thank you again profusely for your help!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,574
Latest member
nikisknight
Top