ACE BUG - BATTLE SCENE CRASHES AFTER CREDISTS. HALP

Posts

Pages: 1
Maybe its easy to solve, but I can't for the life of me, im terrified of changing original scripts.

After any battle scene on my rpg maker ACE the game crashes and I'm given this message;;;





Can someone help ?
Craze
why would i heal when i could equip a morningstar
15170
Go to Vocab (the very first script) and make sure you have a single %s in there. That tells sprintf where to write in the amount of gold.
author=Craze
Go to Vocab (the very first script) and make sure you have a single %s in there. That tells sprintf where to write in the amount of gold.


I still get the same problem in the same line.
But my translated VOCAB has a lot of double " %s ", should I just leave 1 in all lines ?
Check that the ObtainGold string has a single %s. Really you should check the sprintf function and how it works, it's used across pretty much every programming and scripting language out there. The quick gist of it is printf takes a string and adds variables into it. The places to add these variables are denoted by a %x, where the x determines how the variable is formatted. A %s means to insert an entire string, while %i means to insert a signed integer. You tell what variables to insert as arguments after the string in the order that they replace the %x's in the string.

For example, take the obtain gold string of: "%s has found %i %s!". There are three places where variables should be inserted; a %s (string), a %i (signed integer), and another %s (string). So we want to add those variables via printf so the code should be like this:

obtain_gold_string = "%s has found %i %s!"
sprintf(obtain_gold_string, var1, var2, var3)
We have three inserts so we need to pass three extra variables to printf after the string and they replace in the order of arguments. The first %s will be replaced by var1, the %i will be replaced by var2, and the second %s replaced by var3. If you don't pass enough variables printf will spit out an error, and I think the same if there are too many. Var1 would be the party leader's name, var2 would be the gold obtained in the fight, and var3 would be the name of currency in the game.


This page has more details on how to use printf. It's C++ but the format is the same except the first argument of the printf format should be ignored as that's where the output is fed. Google also should have some links for good references on how to use printf, my googlefu is awful right now and I couldn't find much better atm.


TL;DR
Look for
module Vocab
  ObtainGold      = "Found %s\\G gold"
In the vocab in the scripts. Make sure it only has one %s. Or any %x, where x is a single character. Or copy and paste it here and we can fix it for you.
Sorry for the trouble guys.
Actually I installed the "Aftermath Messages" Script, and it fixed the problem.

But thank you very very much for your effort! I hope it might help ppl who find the same bug in the future.
Melkino
solos collectors on purpose
2021
author=tpasmall
Ace is out in English?


Not yet, but there's a translation patch for the Japanese version.
Pages: 1