Lumicakery

Villager
Member
Joined
Jul 11, 2014
Messages
7
Reaction score
3
Primarily Uses
Hey there.

This is a really good plugin but I'm having a problem. I get a Syntax Error - Unexpected token u in JSON at position 0 when I try to access a shop. What's strange is that if I start a new game with the shop right next to me (to test), it works fine. But when I continue from a save slot or play a new game normally, the bug happens. I thought it was Yanfly's Item Core but I still get the bug with or without.

Any ideas or help?
 

ShadowDragon

Realist
Regular
Joined
Oct 8, 2018
Messages
7,765
Reaction score
3,169
First Language
Dutch
Primarily Uses
RMMV
@Lumicakery how did you set up the parameters?
what shops do you use more or plugins?

to see what conflicts it gives, turn off all plugins and turn them on 1 by 1.
and see which conflicts it.

if you found the one that create this bug, move this plugin above it (when below)
otherwise when below, place it above.

if it continue to happen, report back with the parameter, plugin list and event
setup, so mjshi or me can help you out.

because it works correctly on my end with alot of plugins.
 

dragoonwys

Freelance Illustrator
Regular
Joined
Jul 26, 2016
Messages
455
Reaction score
1,215
First Language
english
Primarily Uses
RMMV
@Lumicakery Also its a note to take that when adding a new plugin or just doing anything with plugins in general, that you shouldn't start from a save file to reduce the possibility of errors happening. Always start a new game.
 

Lumicakery

Villager
Member
Joined
Jul 11, 2014
Messages
7
Reaction score
3
Primarily Uses
@Lumicakery how did you set up the parameters?
what shops do you use more or plugins?

to see what conflicts it gives, turn off all plugins and turn them on 1 by 1.
and see which conflicts it.

if you found the one that create this bug, move this plugin above it (when below)
otherwise when below, place it above.

if it continue to happen, report back with the parameter, plugin list and event
setup, so mjshi or me can help you out.

because it works correctly on my end with alot of plugins.
Thanks for the quick replies.

I'm using default parameters and just a standard shop event with no additional stuff. Also, I've removed all other plugins but no dice. Starting a new game doesn't help either. Like I said, if I start a new game just to test the shop, it works. But when I start a new game and play for real, it doesn't. It's really weird (and pretty hard to find the cause). I might just end up just using a different plugin I think.
 
Last edited:

ShadowDragon

Realist
Regular
Joined
Oct 8, 2018
Messages
7,765
Reaction score
3,169
First Language
Dutch
Primarily Uses
RMMV
does it crash? if so, make a screenshot of the console log, which tell
us the cause of the problem and where to look.
 

ShadowDragon

Realist
Regular
Joined
Oct 8, 2018
Messages
7,765
Reaction score
3,169
First Language
Dutch
Primarily Uses
RMMV
thats the one, if it's the only plugin active, mjshi might know the cause,
but I look into it what it cause and what the function does, because it
would be strange if it happend on your end.

(PS: if I dont respond, I hope @mjshi can help you out, as she is the creator of it).
she might need additional info in order to fix it :). I respond in a couple of hours
unless she helped you.

EDIT:
Did you assign a variable?
the default is variable 1, if you have 1 in use, change this variable to an unused variable.
and it should work afterwards, because it's checking a gamevariable.
 
Last edited:

SaburoX

Regular
Regular
Joined
Jan 27, 2013
Messages
98
Reaction score
9
Primarily Uses
Hey there.

This is a really good plugin but I'm having a problem. I get a Syntax Error - Unexpected token u in JSON at position 0 when I try to access a shop. What's strange is that if I start a new game with the shop right next to me (to test), it works fine. But when I continue from a save slot or play a new game normally, the bug happens. I thought it was Yanfly's Item Core but I still get the bug with or without.

Any ideas or help?
I tried this plugin out for the first time today and had this problem. What caused it for me was the variable was looking for a shop I had not defined. It's a little counter intuitive but to call the first shop as defined by the plugin, the variable has to be set to 0 (rather than 1 as I had it).
Double check your variables with this knowledge, you might be one off somewhere.
 

ShadowDragon

Realist
Regular
Joined
Oct 8, 2018
Messages
7,765
Reaction score
3,169
First Language
Dutch
Primarily Uses
RMMV
@SaburoX the variable assigned the ID, not the value, you can store
any number of value for different shop or to say different things when
a common event is called.
 

SaburoX

Regular
Regular
Joined
Jan 27, 2013
Messages
98
Reaction score
9
Primarily Uses
@SaburoX the variable assigned the ID, not the value, you can store
any number of value for different shop or to say different things when
a common event is called.
I worded my post poorly. What I mean is that when the variable equals 0 it looks for id 1, rather than 1 = 1. variable to id.png
mjshi does point this out but it's something I overlooked so it's possible someone else might have this problem.
 

ShadowDragon

Realist
Regular
Joined
Oct 8, 2018
Messages
7,765
Reaction score
3,169
First Language
Dutch
Primarily Uses
RMMV
what is your conditional branch dialogue common event is 0?
because it looks like this isn't triggered.

Also your commen event ID = 3, you use variable 10 instead!
 

mjshi

Jack of Most Trades
Regular
Joined
Feb 16, 2013
Messages
998
Reaction score
885
First Language
English
Primarily Uses
N/A
Sorry for the long absence, @ShadowDragon thanks for helping out!

@Lumicakery, were you able to resolve your problem with what @SaburoX suggested? I probably should add more descriptive error messages in that case. If not, please PM me a test project so I can take a look!
 

Looperdooper

Villager
Member
Joined
Nov 15, 2021
Messages
28
Reaction score
12
First Language
English
Primarily Uses
RMMV
@gothicvoid

There's some setup necessary to get everything running here. If you double click on shopkeepers, then on an empty row, it should pop up something like this:


That's how you add shopkeepers. Just follow the instructions and read the description boxes/names to figure out what each thing is.

Once you configure all of that you set the shopkeep variable (control variable #1, in this case) equal to whatever shopkeep you want to use.

After that, make sure your event looks something like what dragoon posted:



run, and you should be good to go! Let me know if you need a video tutorial, but that will take some time to make. I'm a bit busy at the moment, and it may be at least 3 or 4 weeks before I can find the time to sit down and do all of that.
Heya, I dunno if you're still active on here but if you are and can do that video that would be extremely helpful thanks!
 

dragoonwys

Freelance Illustrator
Regular
Joined
Jul 26, 2016
Messages
455
Reaction score
1,215
First Language
english
Primarily Uses
RMMV
@Looperdooper What problems are you having with the plugin? The basic set up is quite easy to start.
 

Looperdooper

Villager
Member
Joined
Nov 15, 2021
Messages
28
Reaction score
12
First Language
English
Primarily Uses
RMMV
@Looperdooper What problems are you having with the plugin? The basic set up is quite easy to start.
Well basically I have this sort of set up as to where you enter the room it opens the shop and if you close it well you leave the room, though the text doesn't appear when I hit talk instead of when I leave in which it brings me back to the shop menu and never appears again afterward, even if leaving and reentering such. I'm trying to set up the shop sort of like an undertale shop.
 

dragoonwys

Freelance Illustrator
Regular
Joined
Jul 26, 2016
Messages
455
Reaction score
1,215
First Language
english
Primarily Uses
RMMV
@Looperdooper It sounds like you didn't set up the common event for the talk option and/or its something from how your autorun shop event is set up.
Can you take a screenshot of how you are setting up an event?
 

Looperdooper

Villager
Member
Joined
Nov 15, 2021
Messages
28
Reaction score
12
First Language
English
Primarily Uses
RMMV
Here you are, when you walk into the room it autoruns this event.
@Looperdooper It sounds like you didn't set up the common event for the talk option and/or its something from how your autorun shop event is set up.
Can you take a screenshot of how you are setting up an event?
 

Attachments

  • image_2021-11-29_143835.png
    image_2021-11-29_143835.png
    46.8 KB · Views: 14

Looperdooper

Villager
Member
Joined
Nov 15, 2021
Messages
28
Reaction score
12
First Language
English
Primarily Uses
RMMV
The shop appears and junk, it's all good, just the talk option seems broken and closes the shop instead, can only talk once, then never again.
 
Last edited:

Looperdooper

Villager
Member
Joined
Nov 15, 2021
Messages
28
Reaction score
12
First Language
English
Primarily Uses
RMMV
This is also my common event setup.
 

Attachments

  • image_2021-11-29_144749.png
    image_2021-11-29_144749.png
    50.7 KB · Views: 14

dragoonwys

Freelance Illustrator
Regular
Joined
Jul 26, 2016
Messages
455
Reaction score
1,215
First Language
english
Primarily Uses
RMMV
@Looperdooper I can see that you set your setting is the other way around for the if statement

Please set it to
"If: common event called = ON"
"Control switches: common event called = OFF"

The plugin auto turns ON the switch, you have to turn it off instead.
@gothicvoid
It's written in the help file.
First, change the variable chosen in Shopkeeper Variable to the index of your NPC, in the Shopkeepers list. 1st NPC = 0, 2nd = 1, 3rd = 2, etc.
Then, call the shop as per normal!

Here's the example of how the event looks in an event.
gtHZqUy.png
 

Latest Threads

Latest Posts

Latest Profile Posts

I was wondering why Skyler's hair looked weird on their new sprite. Well I forgot adding their iconic hairband
Anyone up to give Holder, TRIDIUM, GenericFantasyDev and Black Mage the fight of their lives?
Go ahead.
"The internet made everyone way too comfortable with disrespecting each other and not getting punched in the face."
I woke up a touch early and was going to draw by the fireplace until it’s a more appropriate noise-making time, but I left my stylus AND my glasses (WHAT?!) upstairs and it’s just too cold to get out of the blanket now.
Made some simple samples with the Time Reversal Mechanic. It would be interesting to make a bigger puzzle where you could dynamically choose which elements are affected by the time reverse. But if there's much more than move routes and waits, it's starts to get too annoying for my brain :D Like even that exploding bomb was such a bother.

Forum statistics

Threads
134,870
Messages
1,251,426
Members
177,669
Latest member
faruza000
Top