Any tips or tutorial to host for myself? I dont have a credit card, so I need to look for alternatives OR use something called Port Forward that I dont know what it means, I only saw that on my router config one time. Thank you!
if @discard_records == 0
begin
yield record
else
raise ProtocolError.new("Unconsumed input: #{record}") if !record.empty?
end
else
@discard_records -= 1
end
Replace the "else" (the one after the "yield record") with "except".Hey I am pretty new to scripting but when I tryed the v18 version I get this error when starting the game.
Seems to be this code block:
Code:if @discard_records == 0 begin yield record else raise ProtocolError.new("Unconsumed input: #{record}") if !record.empty? end else @discard_records -= 1 end
View attachment 153571
______
Edit: Fixing it with chatgtb gives me now this error
View attachment 153574
Yeah, that did the trick.Replace the "else" (the one after the "yield record") with "except".
It's the code from the script here inside the "cable_club.rb" from the v18. I didn't change anything in the logic of the code. So I can't realy say what is wrong there. You can look into the file yourself if you want to take a better look or here is the part where the error appears:For the second error, we need to see the code before helping ^^
@@onUpdateTrainerType = Event.new
)module CableClub
HOST = "localhost"
PORT = 9999
ONLINE_TRAINER_TYPE_LIST = [
[:POKEMONTRAINER_Red,:POKEMONTRAINER_Leaf],
[:PSYCHIC_M,:PSYCHIC_F],
[:BLACKBELT,:CRUSHGIRL],
[:COOLTRAINER_M,:COOLTRAINER_F]
]
ENABLE_RECORD_MIXER = false
# If true, Sketch fails when used.
# If false, Sketch is undone after battle
DISABLE_SKETCH_ONLINE = true
@@onUpdateTrainerType = Event.new
# Fires whenever the online_trainer_type is changed
# Parameters:
# e[0] - the new online_trainer_type
def self.onUpdateTrainerType; @@onUpdateTrainerType; end
def self.onUpdateTrainerType=(v); @@onUpdateTrainerType = v; end
end
@StCooler
Yeah, that did the trick.
It's the code from the script here inside the "cable_club.rb" from the v18. I didn't change anything in the logic of the code. So I can't realy say what is wrong there. You can look into the file yourself if you want to take a better look or here is the part where the error appears:
(row 26 is@@onUpdateTrainerType = Event.new
)
Code:module CableClub HOST = "localhost" PORT = 9999 ONLINE_TRAINER_TYPE_LIST = [ [:POKEMONTRAINER_Red,:POKEMONTRAINER_Leaf], [:PSYCHIC_M,:PSYCHIC_F], [:BLACKBELT,:CRUSHGIRL], [:COOLTRAINER_M,:COOLTRAINER_F] ] ENABLE_RECORD_MIXER = false # If true, Sketch fails when used. # If false, Sketch is undone after battle DISABLE_SKETCH_ONLINE = true @@onUpdateTrainerType = Event.new # Fires whenever the online_trainer_type is changed # Parameters: # e[0] - the new online_trainer_type def self.onUpdateTrainerType; @@onUpdateTrainerType; end def self.onUpdateTrainerType=(v); @@onUpdateTrainerType = v; end end
You are right. Now it will find the events but I got another error. Where should be the pbEffect defined? I can only find the module PBEffects in my scripts.Do you have the file "Event Handlers" (or 003_Event_Handlers)?
You should have "class Event" somewhere, but not in a "module RPG". If not, you miss files.
The other explanation is that you may have placed the Cable Club file before the file Event Handlers. The solution is just to place it before Main but after all the other files.
alias _cc_pbEffect pbEffect
#===============================================================================
# This move permanently turns into the last move used by the target. (Sketch)
#===============================================================================
class PokeBattle_Move_05D
alias _cc_pbEffect pbEffect
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
if CableClub::DISABLE_SKETCH_ONLINE && [email protected]
@battle.pbDisplay(_INTL("But it failed!"))
return -1
end
return _cc_pbEffect(attacker,opponent,hitnum,alltargets,showanimation)
end
end
You are right. Now it will find the events but I got another error. Where should be the pbEffect defined? I can only find the module PBEffects in my scripts.
View attachment 153696
The code is following with 1537 beingalias _cc_pbEffect pbEffect
Code:#=============================================================================== # This move permanently turns into the last move used by the target. (Sketch) #=============================================================================== class PokeBattle_Move_05D alias _cc_pbEffect pbEffect def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true) if CableClub::DISABLE_SKETCH_ONLINE && [email protected] @battle.pbDisplay(_INTL("But it failed!")) return -1 end return _cc_pbEffect(attacker,opponent,hitnum,alltargets,showanimation) end end
#===============================================================================
# This move permanently turns into the last move used by the target. (Sketch)
#===============================================================================
class PokeBattle_Move_05D
alias _cc_pbEffectAgainstTarget pbEffectAgainstTarget
def pbEffectAgainstTarget(user,target)
if CableClub::DISABLE_SKETCH_ONLINE && [email protected]
@battle.pbDisplay(_INTL("But it failed!"))
return -1
end
return _cc_pbEffectAgainstTarget(user,target)
end
end
C:\Users\sirzento\Documents\RPGXP\Project1>python cable_club.py
Traceback (most recent call last):
File "C:\Users\sirzento\Documents\RPGXP\Project1\cable_club.py", line 557, in <module>
Server(args.host, int(args.port), args.pbs_dir).run()
File "C:\Users\sirzento\Documents\RPGXP\Project1\cable_club.py", line 34, in __init__
self.valid_party = make_party_validator(pbs_dir)
File "C:\Users\sirzento\Documents\RPGXP\Project1\cable_club.py", line 368, in make_party_validator
pokemon_by_name[sname].moves.add(move)
KeyError: 'OM'
with io.open(os.path.join(pbs_dir, r'tm.txt'), 'r', encoding='utf-8-sig') as tm_pbs:
move = None
for line in tm_pbs:
line = line.strip()
match = re.match(r'\[([A-Z]+)\]', line)
if line.startswith('#'):
continue
elif match:
move = moves_by_name[match.group(1)]
else:
for name in line.split(','):
if name:
# TODO: Cheating here to get it to run
sname=name.partition('_')[0]
pokemon_by_name[sname].moves.add(move)
def moves=
issue kind of technically caused by DBK if you allow Sketch to be used online.Yeah i revised the server pbs format, you need to use the converter script. There are instructions in the manual on how to use it.Hi sorry to ask your help for something maybe stupid but i got a problem with the key gender_ratio and i dont know what is the problem, i got this error and i use the cable link for Essential V21
if someone can help me ?
the command makes the server log more data inti the server.log file, which you can open in any text editor. if you tried to connect to the server in debug mode, it should log the exact reject reason.i read the manual and im block at the part when my log say "invalid party" and i try the command py cable_club.py --log=DEBUG but nothing happen... so i dont know where from the error, its possible one of my plugin make this error ?
You have to open the server.log file, if you run it in debug mode, it'll tell you exactly the issue it had with the party. You can even post it here if you want me to look over it, but without that file, I can only guess based on common issues.I change by true all plugin i got but i think is not that this is what my debug say when i tried to use it but i dont really understand :/ But thanks for your help !View attachment 156777
you need to run it in debug mode and try again.That what my server.log say when i try to connect online