why tag mismatch ?
#1

what's wrong in here ?

pawn Код:
new NewMoney = HitMoney[targetid] * 0.75;
Reply
#2

Maybe *= instead of *

Reply
#3

Quote:
Originally Posted by AnonScripter
Посмотреть сообщение
what's wrong in here ?
pawn Код:
new NewMoney= HitMoney[targetid] * 0.75;
Is NewMoney an array?
Reply
#4

NewMoney is a under a command.
HitMoney is a variable on the top of the script.
Reply
#5

Money can't be a float! 0.75 is a float value. Just multiply it with some integer, not float.
Reply
#6

Quote:
Originally Posted by iZN
Посмотреть сообщение
Money can't be a float! 0.75 is a float value. Just multiply it with some integer, not float.
i hope it will work if i do:
pawn Код:
new NewMoney= HitMoney[targetid] * (75/100);
Reply
#7

Quote:
Originally Posted by AnonScripter
Посмотреть сообщение
i hope it will work if i do:
pawn Код:
new NewMoney= HitMoney[targetid] * (75/100);
You're actually not getting my point. For example, if your hit money is $55, so 55*75/100 = 41.25 which is an INVALID value for money. If it's for different purpose other than money, than use Float: tag. "new Float:NewMoney = .."
Reply
#8

Quote:
Originally Posted by iZN
Посмотреть сообщение
You're actually not getting my point. For example, if your hit money is $55, so 55*75/100 = 41.25 which is an INVALID value for money. If it's for different purpose other than money, than use Float: tag. "new Float:NewMoney = .."
if the hitmoney is $55, then the new money will be $41 instead of $41.25
Tested and worked
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)