Expand debuggingoptions?

Status
Not open for further replies.

MC_Kay

Villager
Member
Joined
Dec 29, 2017
Messages
11
Reaction score
0
First Language
german
Primarily Uses
N/A
Hello I'm new here and hope, that my request is in the correct section of the board.

Sry for my "bad" english, I'm from germany. ;)

Now my question:
Exist an option in RPG Maker VX Ace to see expand debuggingoptions?
I want to test my script, but the console is not enough for me. :(

I already know the option to see the current state of switches and other by using F9, but I get an exception. If an exception occur, the F9-Option isn't avail anymore.
My exception is:
Code:
(eval):3: syntax error, unexpected tGVAR, expecting ']'
$game_element[1339] = 0
             ^ (is placed under the "[")
syntacerror.txt and errors.txt dont show enough informations to find my problem.
Console is a waste of time, only useless scrap. Because it only show me a change at starting a conversation with an NPC, changing location, etc.

I know really good debuuging-options from EXAM or Eclipse. I can set breakpoints and show me every variable with every value step by step.
I want to see informations like:
  • actually value of "every" variable
  • NPC_01 rotates by 90° clockwise
  • NPC_01 make a step to the left
  • etc.

Exist there an option or plugin to help me?


Greetings
MC_Kay
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,434
Reaction score
7,713
First Language
German
Primarily Uses
RMMV
Follow the link "how to use a script" in my signature to the backtracer.
That is the only tool I know of to help with script errors.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,600
Reaction score
6,552
First Language
Indonesian
Primarily Uses
RMVXA
Try to replace 'main' in script editor with this backtracer
Quite helpful in most of cases
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,715
First Language
English
Primarily Uses
RMMV
Can you show us the whole block of code that line comes from? I'm not sure you'll get much more info than you already have.

I suspect it might actually be the line before that needs a ] to close it.
 

MC_Kay

Villager
Member
Joined
Dec 29, 2017
Messages
11
Reaction score
0
First Language
german
Primarily Uses
N/A
Hello,

thx for your help!

@Andar and @TheoAllen
I've tested both versions, but I don't get more Informations as before.
And there is a small difference between both. The additional "exit" at line 43 in the version posted by TheoAllen.

@Shaz
That was my first Idea, but I dont know on which line that could be. I use
"game_element["
round about 400 times. The whole script is up to 72'000 lines long.
To troubleshoot my script, I need a debugging-mode (show line in script where the exception occur.

Greetings
MC_Kay
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,600
Reaction score
6,552
First Language
Indonesian
Primarily Uses
RMVXA
The whole script is up to 72'000 lines long.
A bad idea I'd say. I will be easier if you break em down into a smaller part like a different class in different section of script.

But honestly though, I never get an error like you got in my whole life of scripting in Ace
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,715
First Language
English
Primarily Uses
RMMV
I use
"game_element["
round about 400 times.
How many times do you use the exact text
Code:
$game_element[1339] = 0
You're not just looking for $game_element[ - you're looking for $game_element[1339] = 0 - the exact and full text.

Find any lines that have that exact / full text. Then look at the line(s) above.
 

MC_Kay

Villager
Member
Joined
Dec 29, 2017
Messages
11
Reaction score
0
First Language
german
Primarily Uses
N/A
How many times do you use the exact text
Code:
$game_element[1339] = 0
I dont adress an element of my list by using static variables like "1339".
All are dynamic like by values.

That is the reason why I need a debugging option to see the actually value of every variable. ;)
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,434
Reaction score
7,713
First Language
German
Primarily Uses
RMMV
I dont adress an element of my list by using static variables like "1339".
All are dynamic like by values.

That is the reason why I need a debugging option to see the actually value of every variable. ;)
No, you don't.
The original error message you posted is a syntax error, not a value error.
That means you mixed up the typing somewhere, not the value inside a dynamic variable.

So search for the phrase with the correct variable instead of a fixed value.
Most likely you added a space or linebreak in the wrong position to get that error.
 

MC_Kay

Villager
Member
Joined
Dec 29, 2017
Messages
11
Reaction score
0
First Language
german
Primarily Uses
N/A
No, you don't.
The original error message you posted is a syntax error, not a value error.
That means you mixed up the typing somewhere, not the value inside a dynamic variable.
I've checked the whole code for a mistake like that, but I don't use
Code:
$game_element[1339]
in the whole script....

So search for the phrase with the correct variable instead of a fixed value.
Most likely you added a space or linebreak in the wrong position to get that error.
I used this:
Code:
$game_element[*=*0
* = wildcard
only 25 times. (13 als "==" or "!=" but only 12 with a single "=")
And all are finished with a "]"

Code:
      $game_element[variable_id] = 0
    $game_element[$game_message.item_choice_variable_id] = 0
    if $game_element[GAME::ADV::CLOTH_ID[0]] == 0
  "Potion"        => ["n_7",   0,  "$game_element[51] == 0"],
  "Potion"      => ["$game_element[51] = 0"],
      if $game_switches[103] && $game_element[51] == 0
      $game_element[GAME::SET_DEGREE[1]] = 0
      $game_element[GAME::SET_DEGREE[1]] = 0
      if $game_element[51] == 0
      $game_switches[126] = true if $game_element[51] == 0
      $game_element[i] = 0 if $game_element[i] == 1
    if $game_element[GAME::ADV::CLOTH_ID[0]] == 0
      if $game_element[4] == 0
        $game_element[GAME::SET_SHOP] = 0
      file = GAME::ADV::EVCG_DIR + ev_file + "_a" if $game_element[GAME::ADV::CLOTH_ID[0]] == 0
      file = GAME::ADV::EVCG_DIR + ev_file + "_a" if $game_element[GAME::ADV::CLOTH_ID[0]] == 0
      file += "a" if $game_element[GAME::ADV::CLOTH_ID[0]] == 0
        if $game_element[GAME::ADV::CLOTH_ID[0]] == 0
        if $game_element[GAME::ADV::CLOTH_ID[0]] == 0
      $game_element[GAME::BATTLE::BATTLE_RESULT] = 0
      $game_element[GAME::BATTLE::BATTLE_RESULT] = 0
      $game_element[i] = 0
    $game_element[220] = 0
    :hide     => "$game_element[1] == 0",
    :enable   => "$game_element[50] != 0",

Greetings
MC_Kay
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,434
Reaction score
7,713
First Language
German
Primarily Uses
RMMV
And what is the backtracer output of that error?
Can you give a screenshot of that sequence?

And give the complete codelines until the ] instead of only claiming they end like that? Because one of them does not end with a ] or you wouldn't get that Syntax error.
 

MC_Kay

Villager
Member
Joined
Dec 29, 2017
Messages
11
Reaction score
0
First Language
german
Primarily Uses
N/A
And what is the backtracer output of that error?
What is the"backtracer"? Oo
Can you give a screenshot of that sequence?
My problem is, I can not take a screenshot. Everytime I use my snipping-tool, The window is empty .....
And give the complete codelines until the ] instead of only claiming they end like that? Because one of them does not end with a ] or you wouldn't get that Syntax error.
Look at my edit in previous post ;)
Code:
*SyntaxError - 2017-12-25 23:13:52 (Monday)
(eval):3: syntax error, unexpected tGVAR, expecting ']'
*SyntaxError - 2017-12-25 23:13:52 (Monday)
(eval):3: syntax error, unexpected tGVAR, expecting ']'
$game_element[1339] = 0
*SyntaxError - 2017-12-25 23:13:52 (Monday)
(eval):3: syntax error, unexpected tGVAR, expecting ']'
$game_element[1339] = 0
             ^
*SyntaxError - 2017-12-25 23:13:52 (Monday)
(eval):3: syntax error, unexpected tGVAR, expecting ']'
$game_element[1339] = 0
             ^
(eval):4: syntax error, unexpected keyword_else, expecting $end

Edit:
Maybe there is a missing "end", but I don't know where ..... :(
Why "keyword_else" and "$end"? I don't use both nowhere in the whole script. Oo

Over 9'000! ( xD ) matches by counting "end"
Over 660 matches by counting "else" ....

Greetings
MC_Kay
 
Last edited:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
For your screen shot, instead of snipping, use Alt+PrtSc. That will take a screen shot of just the active window, not your whole desktop.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,434
Reaction score
7,713
First Language
German
Primarily Uses
RMMV
As I said - Syntax error is when you mistype, exactly like here:
I've checked the whole code for a mistake like that,
Code:
  "Potion"      => ["$game_element51] = 0"],
      if $game_switches[103] && $game_element51] == 0
      file += "a" if $game_elementGAME::ADV::CLOTH_ID[
Those are three lines with Syntax errors from your copy&paste, I only accidentally deleted the end of the third line but the missing [ is still visible.

And if your snipping tool doesn't work, simply use the default Windows Screenshot without any tool.

As for the backtracer, that is the tool you were linked above twice in this very topic.
And that tool will give you the exact trace of the error in its console output.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,600
Reaction score
6,552
First Language
Indonesian
Primarily Uses
RMVXA
Idk man, the example script you posted already wrong in many aspect.
It seems like you accidentally doubled some lines? Seems like copy paste error
Like why u need two lines of these
Code:
       if $game_element[GAME::ADV::CLOTH_ID[0]] == 0
       if $game_element[GAME::ADV::CLOTH_ID[0]] == 0
     $game_element[GAME::BATTLE::BATTLE_RESULT] = 0
     $game_element[GAME::BATTLE::BATTLE_RESULT] = 0
Where did you get that script anyway?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,434
Reaction score
7,713
First Language
German
Primarily Uses
RMMV
@TheoAllen that is NOT a script, he copy&posted the 25 lines of the much larger script he's writing himself that contain the object that gave the error.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,600
Reaction score
6,552
First Language
Indonesian
Primarily Uses
RMVXA
Well, at first I believe he wrote the script himself. But after looked at the posted code itself. Now I'm being skeptic. So my guess is he might be trying to debug someone else's while saying my script cz it's in his project.

Regardless though, I see the script they posted already have so many non-senses. Like sudden hash value without bracket, so many if without else or even ends (even doubled lines). Syntax error really makes sense in this case
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,434
Reaction score
7,713
First Language
German
Primarily Uses
RMMV
I see the script they posted
He has no script posted anywhere, so of course the unconnected lines he copied together make no sense. But that has nothing directly to do with the Syntax error, because there is no script posted in this topic.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,600
Reaction score
6,552
First Language
Indonesian
Primarily Uses
RMVXA
Only posted lines that giving the error? I guess I fail to understand the thing here. I will keep watching. Sorry for a little intrusion.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,715
First Language
English
Primarily Uses
RMMV
As I said, the error is most likely on the line BEFORE the one that's being reported. So you need to look them all up, and look at the lines BEFORE, to see what's going on.

If it's too much, send me your script and I'll try to find it for you.

@TheoAllen the script lines shown are just the ones that match the formatting of the one that's throwing the error.
 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,051
Messages
1,018,549
Members
137,837
Latest member
Dabi
Top