View Single Post
Old 09-16-2007, 03:28 AM   #17
A1win
Nutcracker
 
A1win's Avatar
 
Join Date: Sep 2007
Location: Kuopio, Finland
Posts Rated Helpful 0 Times
Send a message via MSN to A1win
I think you need to do:
damageinfo:SetDamage( insert a float with 12 decimal precision here )

or:
damageinfo.SetDamage( insert a float with 12 decimal precision here )

No idea what's the difference between : and . but when I use the first one, it returns an error even with damageinfo:SetDamage() saying I'm trying to give a number as a parameter even though there are no parameters at all. The second one gives error that I need to use "custom [float]" instead of a "number" if I try to give it a number as a parameter. But I have no idea how to convert a number into a 12 decimal float. LUA's "number" is already a float, but only with 2 decimal precision (0.00 for example). The SetDamage() function wants something like 0.000000000000, but it's converted into a number (0) if you type in just that.
A1win is offline   Reply With Quote