- Joined
- Sep 19, 2018
- Messages
- 23
- Reaction score
- 1
- First Language
- English
- Primarily Uses
- RMXP
I've been running into an issue with the script. There's a script call I can, in theory, use to put a party member into reserve.
I say in theory as I can't seem to get it to work.
Whenever I try to use it, I get the error message: ArgumentError occurred while running script. wrong number of arguments (0 for 1)
The call is $game_party.remove_actor_to_party(actor_id)
The part of the script I think is in question is this:
...I don't know what's wrong. All I am doing is replacing actor_id in the script call with a number (in the case of my testing, it was actor 26)
I don't know what I'm doing wrong (or if there's an error in the script as this is like trying to read... a language using an alphabet that isn't of that language) so... um...
Help, please?
Edit: Also, this is not the entire script. I'm just posting what seems to be connected with my issue.
I say in theory as I can't seem to get it to work.
Whenever I try to use it, I get the error message: ArgumentError occurred while running script. wrong number of arguments (0 for 1)
The call is $game_party.remove_actor_to_party(actor_id)
The part of the script I think is in question is this:
Code:
#==================================================
# Game_Party
#==================================================
class Game_Party
attr_accessor :party_members
attr_accessor :move
attr_accessor :locked
attr_accessor :min_size
attr_accessor :max_size
alias leon_partyswitch_gameactor_initialize initialize
def initialize
leon_partyswitch_gameactor_initialize
@party_members = []
# Edit :This is to change if an actor is locked or not. To lock them, add
# their id to the array below.
@locked = []
@min_size = 1
@max_size = 4
end
def add_actor(actor_id)
actor = $game_actors[actor_id]
if @actors.size < @max_size
unless @actors.include?(actor)
unless @party_members.include?(actor.id)
@actors.push(actor)
$game_player.refresh
end
end
else
unless @party_members.include?(actor.id)
unless @actors.include?(actor)
@party_members.push(actor.id)
$game_player.refresh
end
end
end
end
def remove_actor(actor_id)
@actors.delete($game_actors[actor_id])
@party_members.delete(actor_id)
$game_player.refresh
end
def remove_actor_from_party(actor_id)
if @actors.include?($game_actors[actor_id])
unless @party_members.include?(actor_id)
@party_members.push(actor_id)
@party_members.sort!
end
end
@actors.delete($game_actors[actor_id])
$game_player.refresh
end
def add_actor_to_party(actor_id)
if @party_members.include?(actor_id)
if @actors[@max_size - 1] != nil
@party_members.push(@actors[@max_size - 1].id)
@actors.delete_at(@max_size - 1)
end
@actors.push($game_actors[actor_id])
@party_members.delete(actor_id)
end
end
end
#==================================================
# END Game_Party
#==================================================
I don't know what I'm doing wrong (or if there's an error in the script as this is like trying to read... a language using an alphabet that isn't of that language) so... um...
Help, please?
Edit: Also, this is not the entire script. I'm just posting what seems to be connected with my issue.
Last edited:

