Difference between revisions of "Talk:Drink"

From Kolmafia
Jump to navigation Jump to search
imported>Fxer
m (Code sample error?)
 
imported>Heeheehee
m
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The code sample will overdrink actually, won't it? If you have 20 drunk limit and are currently at 16 drunk, it will down one tangarita it looks like. --[[User:Fxer|Fxer]] 18:13, 31 March 2010 (UTC)
+
About the use of floor() here: since amount is an int, the amount is already floored. I didn't know about this, but ashq int a = 0.9; print(a); will return 0.[[User:Slyz|Slyz]] 16:52, 1 April 2010 (UTC)
 +
 
 +
Yeah, I realized that after the edit (technically, it truncates), but might as well use integers where it wants integers (avoid some confusion?). --[[User:Heeheehee|Heeheehee]] 03:52, 2 April 2010 (UTC)

Latest revision as of 03:52, 2 April 2010

About the use of floor() here: since amount is an int, the amount is already floored. I didn't know about this, but ashq int a = 0.9; print(a); will return 0.Slyz 16:52, 1 April 2010 (UTC)

Yeah, I realized that after the edit (technically, it truncates), but might as well use integers where it wants integers (avoid some confusion?). --Heeheehee 03:52, 2 April 2010 (UTC)