Okay, so I am using Legacy Class Change (http://forum.chaos-project.com/index.php?topic=1688.0) script, and I want to add a Class level using events to the current class my actor is. So I used this code:
$game_actors[1].class_levels[$game_actors[1].class_id] += 1
When I run the game and run the script in the event I get a syntax error. What am I doing wrong?
I tested:
$game_actors[1].class_levels[X] += 1
where X is a regular integer. So I know I am doing somthing wrong when I input
and
But I have no Idea what I'm doing wrong
The error message I get is: "SyntaxError occured while running the script"
It's $game_actors[1], not $data_actors[1]
I just tried that too, still getting the same error message :(
check the lines above and see if your forgot to close anything like []'s or ()'s
I'm not quite sure what you're trying to do with this system, but I think it would be easier just to call a level up. If you use the level up event command, it will also increase the current class level by one. As far as I can see, your code SHOULD be working. The script call command acts a bits screwy though, so play around with it (where each line break is) a bit, that might fix the problem.
BTW, glad you're using my system ^_~
Oh! Your script probably gets cut off in the script call and goes to another line.
You have to make sure that it gets cut off in the right place.
Make sure the line above it ends in something that signifies that the script is still the same one, like a . or [ or (
So try this...
$game_actors[1].
class_levels[$game_actors[
1].class_id] += 1
Quote from: Aqua on June 18, 2009, 11:13:02 am
Oh! Your script probably gets cut off in the script call and goes to another line.
You have to make sure that it gets cut off in the right place.
Make sure the line above it ends in something that signifies that the script is still the same one, like a . or [ or (
So try this...
$game_actors[1].
class_levels[$game_actors[
1].class_id] += 1
Thank you so much! it works now :D
BTW what I was trying to do was level up the current class my character is without acutally leveling up the character.
Quote from: Aqua on June 18, 2009, 11:13:02 am
Oh! Your script probably gets cut off in the script call and goes to another line.
You have to make sure that it gets cut off in the right place.
Make sure the line above it ends in something that signifies that the script is still the same one, like a . or [ or (
So try this...
$game_actors[1].
class_levels[$game_actors[
1].class_id] += 1
that's what I was telling yah to do, I just didn't know exactly how to do it.
And ok, that sounds reasonable, the class level up without a regular one. I can think of a few uses for that. Anyways. good luck with your project.