error 001: expected token: "-identifier-", but found "("
#1

-- DELETED --
Reply
#2

The mistake lies somewhere else, but the compiler isn't able to realize that, search somewhere else, something that you have recently changed
Reply
#3

https://sampwiki.blast.hk/wiki/Floatabs
Reply
#4

That's for floats. There's nothing wrong with the function itself (although it can be written shorter, see below) so you probably placed it in the wrong spot.

PHP код:
stock abs(value)
    return (
value 0) ? -value value
Reply
#5

Quote:
Originally Posted by Vince
Посмотреть сообщение
That's for floats. There's nothing wrong with the function itself (although it can be written shorter, see below) so you probably placed it in the wrong spot.

PHP код:
stock abs(value)
    return (
value 0) ? -value value
Yes, but you can use floatabs with integers as well. All you need to do is round it after getting it's absolute value.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)