I'm trying to create a plugin for the first time, but I don't know what's wrong with the code.

Do you have any issues? Don't hesitate to tell us about it.
User avatar
Death Raise
Settler
Reactions:
Posts: 2
Joined: 16 Jun 2023, 19:46

I'm trying to create a plugin for the first time, but I don't know what's wrong with the code.

#1

Post by Death Raise »

Code: Select all

[
 {
 "ID" : "pew_3450d56bdeee00",
 "title" : "Gwangan High School",
 "text" : "It is a fictional school that does not exist as the background of the work in Reply 1997.",
 "frames" : [{"bmp" : "plugins (20).zip"}],
 "type" : "education",
 "influence education high" : "90",
 "influence commercial" : "12",
 "width" : "8",
 "height" : "7",
 "provide aspect education high" : "15000",
 "provide aspect education low" : "15000",
 "price" : "-980000",
 "monthly prcie" : "-890000",
 "power" : "-550",
 "water" : "-550",
 "needs road" : "true",
 "needs land" : "true",          
 "build time" : "110"
 "max count" : "1",
 {
[
Since the canteen is a plug-in in the school, I also put in the commercial influence code.
Please tell me where to fix the code

User avatar
CommanderABab
AB
Reactions:
Posts: 11107
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: I'm trying to create a plugin for the first time, but I don't know what's wrong with the code.

#2

Post by CommanderABab »

Death Raise wrote:
16 Jun 2023, 20:42
<..>

Since the canteen is a plug-in in the school, I also put in the commercial influence code.
Please tell me where to fix the code

Code: Select all

 
 
[
{
//should be lower case "id"
"ID" : "pew_3450d56bdeee00",
"title" : "Gwangan High School",
"text" : "It is a fictional school that does not exist as the background of the work in Reply 1997.",
//"bmp" takes files of type .png
"frames" : [{"bmp" : "plugins (20).zip"}],
"type" : "education",
//in JSON code, numbers, true and false do not need quotes
"influence education high" : "90",
//there is no influence commercial that I am aware of
"influence commercial" : "12",
//width should equal height
"width" : "8",
"height" : "7",
"provide aspect education high" : "15000",
"provide aspect education low" : "15000",
// negative price and monthly price 
"price" : "-980000",
// misspelled price
"monthly prcie" : "-890000",
"power" : "-550",
"water" : "-550",
"needs road" : "true",
"needs land" : "true",
"build time" : "110"
"max count" : "1",
{
//need ] here, not [
[
Fix or take note of the things mentioned in the // comment lines.

User avatar
Death Raise
Settler
Reactions:
Posts: 2
Joined: 16 Jun 2023, 19:46

Re: I'm trying to create a plugin for the first time, but I don't know what's wrong with the code.

#3

Post by Death Raise »

CommanderABab wrote:
16 Jun 2023, 22:39
Death Raise wrote:
16 Jun 2023, 20:42
<..>

Since the canteen is a plug-in in the school, I also put in the commercial influence code.
Please tell me where to fix the code

Code: Select all

 
 
[
{
//should be lower case "id"
"ID" : "pew_3450d56bdeee00",
"title" : "Gwangan High School",
"text" : "It is a fictional school that does not exist as the background of the work in Reply 1997.",
//"bmp" takes files of type .png
"frames" : [{"bmp" : "plugins (20).zip"}],
"type" : "education",
//in JSON code, numbers, true and false do not need quotes
"influence education high" : "90",
//there is no influence commercial that I am aware of
"influence commercial" : "12",
//width should equal height
"width" : "8",
"height" : "7",
"provide aspect education high" : "15000",
"provide aspect education low" : "15000",
// negative price and monthly price 
"price" : "-980000",
// misspelled price
"monthly prcie" : "-890000",
"power" : "-550",
"water" : "-550",
"needs road" : "true",
"needs land" : "true",
"build time" : "110"
"max count" : "1",
{
//need ] here, not [
[
Fix or take note of the things mentioned in the // comment lines.
Is it a code problem or an game application problem?
The saved location is saved in a file storage called ALZIP in BlueStacks 5.

User avatar
Rad
Inhabitant of a Megacity
Reactions:
Posts: 188
Joined: 05 Dec 2020, 22:47
Location: A Galaxy far far away
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: I'm trying to create a plugin for the first time, but I don't know what's wrong with the code.

#4

Post by Rad »

Also the comma at the end of "max count":"1",
instead it should be "max count": 1

User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5730
Joined: 10 Feb 2017, 14:53
Location: L2 cache
Plugins: Showcase Store

Plugin Creator

Platform

Re: I'm trying to create a plugin for the first time, but I don't know what's wrong with the code.

#5

Post by Bearbear76 »

Death Raise wrote:
17 Jun 2023, 08:28
CommanderABab wrote:
16 Jun 2023, 22:39
...
Is it a code problem or an game application problem?
The saved location is saved in a file storage called ALZIP in BlueStacks 5.
It's a code problem. Start by fixing the things the members mention about your code.
I would also add this:

Code: Select all

 
"max count" : "1",
{ // needs to be '}' not '{' here
//need ] here, not [
[

Post Reply Previous topicNext topic

Return to “Problems and Errors (bugs)”