Page 1 of 1

Linix Compile Error: Combat and Commands

Posted: Mon Oct 21, 2013 11:24 am
by John Adams
Combat.cpp: In member function ‘void Entity::MeleeAttack(Spawn*, float, bool, bool)’:
Combat.cpp:210: error: ‘floor’ was not declared in this scope
Combat.cpp: In member function ‘void Entity::RangeAttack(Spawn*, float, Item*, Item*, bool)’:
Combat.cpp:312: error: ‘floor’ was not declared in this scope
make: *** [Combat.o] Error 1
Combat.cpp:

Code: Select all

int8 automatic_multi = floor((int8)(multi_attack / 100));

And, much to your amazement, I actually fixed it myself. For some reason, you added floor() without including <math.h> and PoS Windows compiler seems okay with that...