Okay so what... Why... I'm so confused... The line of code is this, under Game_Event line 203:
return false unless $game_switches[c.switch1_id]
Usually I'd provide more... But... This is the original code of the game!...
Script 'Game_Event' line 203: NoMethodError occurred.
undefined method '[]' for nil:NilClass
And I'm just... Wondering why? Lol...
Okay so here's the thing: I can NOT start a new game. That's what this line of code is for.. But... I can load a state?... I'm so confused someone please halp lol
What have you done in OTHER areas of the script?
The error message is saying $game_switches is not defined. This happens when you try to access $game_switches outside of a game - usually when you try to add your own code to do something but haven't put it into the correct class/method.
Where did you download Ace from, and how long ago?
I downloaded ace from steam, a couple months ago.. Before that, I had downloaded the free trial and messed around with it, but not much else really.
I downloaded a Pokemon extension to it during the free trial... Maybe that messed with some code I guess?...
I also put some things under materials and erased it afterwards?... I mean, I thought if you erased it, it wouldn't cause any more problems...... Seeing as .... It's not there anymore lol
Basically something is in Materials that doesn't belong where it is now, either because you forget to erase it completely or because it is incomplete and contains bugs.
You need to find out what or where that is, because we do not know what you have added or deleted there.
I suggest you follow the link "how to use a script" in my signature and see if the explanations there help you find where you made a mistake.
Are you SURE you erased all of it? Just double check - especially if you have any slots without names. Those are good places to look for stuff someone was "playing" with and forgot they had there.
Or just create a brand new project, then grab the scripts.rvdata2 file from that project and paste it into your current one.
Also, I think with Ace, you can make changes to scripts, then play without saving, so it would have the old version of the scripts file.
I know, but I debug one function at a time.
if Event is not affected, then it's gotta be an error before Main is even run.
going directly for debugging from Main can branch into many possibilities.
they pointed to a problem at Game_Event:203
Game_Event:203 is specifically conditions_met?()
if that is changed, then chances are Game_Event itself is changed.
better secure that the RPG:: object is safe, and then move from there.
the next step is tracking $game_switches itself, and then further down.
Okay, so first off... This place... Blew up holy crap, second off:
Yes, it's all deleted... Even the green text is deleted from material, which I'm pretty sure was just notes?...(Future Edit: Fixed Material itself btw, went into a new game and just copied and pasted) I think? I know a bit about code, and I know that most of the time you can just type // and then write out whatever you want without messing with the game at all... Of course that's java, but I've seen a couple others do it as well... What got me about that green text was it didn't have a // in front of it, just an =begin sign.. But then again, I also know RpgMaker uses Ruby for coding... And I know nothing about Ruby. So I might have just messed it up, I don't know...
Anyway, I opened a new game, fixed up Game_Event, made sure it was the actual code anyway... I think I messed with Game_Variables or Game_Switches a bit too... I'm gonna fix those and see if it works.
It did not work! 😀
Kill me.
I also did a global search through the script editor for any plug-ins.. Looks like it really just kept to itself in one game... Because I opened both, and saw no remnants of the plug-in in my new game, where they were in the game with the plug-in anyway...
So... Life?... Yeah... Life...
Let's clear up a few things.
MV uses Javascript
Ace uses Ruby
// is for a comment in Javascript
# is for a comment in Ruby
If you went in and added // all over your scripts, you're definitely going to have problems.
If you haven't added any extra scripts, or you deleted all the ones you added (as far as you know) and you just want an original RTP script file, do what I already said - create a new project and copy its scripts.rvdata2 file into your existing project, overwriting the one you have there. Then don't mess with scripts if you don't know what you're doing 😉
Yeah, like I said in the above reply, I already knew that it used Ruby, and that // was for java.
But I actually took a look myself and saw that it started with an = sign, which is why I already did what you suggested lol
And I never said I did a //, I was just saying that Java and a lot of other languages use that...
ANYWHO~ I finally got it working, thank goodness, and thank all of you for helping me through that nightmare lol