forked from Sarjuuk/aowow
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception - number_format(): Argument #1 ($num) must be of type float, string given #46
Comments
Ok this works: // collect data and write to DB
foreach ($this->iterate() as $__)
{
$updateFields = ['type' => Type::ITEM, 'typeId' => $this->id];
foreach (@$this->json[$this->id] as $k => $v)
{
if (!in_array($k, $this->statCols) || !$v || $k == 'id')
continue;
$updateFields[$k] = number_format((float)$v, 2, '.', '');
}
if (isset($this->itemMods[$this->id]))
{
foreach ($this->itemMods[$this->id] as $k => $v)
{
if (!$v)
continue;
if ($str = Game::$itemMods[$k])
$updateFields[$str] = number_format((float)$v, 2, '.', '');
}
}
DB::Aowow()->query('REPLACE INTO ?_item_stats (?#) VALUES (?a)', array_keys($updateFields), array_values($updateFields));
} |
keep your workaround for now. I'm currently rewriting how player stats are handled because of Sarjuuk#389 and that will obvioulsy affect the item-stats setup step as a whole |
error source removed in Sarjuuk@d16b08b needs to be merged |
you know, you have push (and sync) permisions here xd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm installing the whole setup in a fresh host.
When the installer reaches the SqlGen::generate() - filling aowow_item_stats with data - I've got the following error:
System:
The text was updated successfully, but these errors were encountered: