I found that .round has to be connected to the variable without being split, so having code on separate lines is fine as long as the code isn't cut in half somewhere and continued on a new line.
EDIT: I have this stupid bug now.
$game_variables[552]/=100
$game_variables[552]+=1
$game_variables[548]*=$game_variables[552]
$game_variables[548]=
$game_variables[548].round
[552] = the Loan's interest rate. At the moment, it equals 25. [552]=25
[548] = how much money you withdraw in a loan to borrow. (Example: 10000G)
So what
should be happening is:
25/100 = .25
.25+1 = 1.25
10000*1.25 = 12500
(Then if it happens to be a decimal, it'll round it.)
However, what's happening is that the result remains the amount you withdraw without adding on the interest. So in this example, the result ends up staying 10000 instead of becoming 12500 like it should be. It might be caused by the .round, but I'm not sure. Does .round only round decimals, or does it round whole numbers up to like the next whole number? Like rounding 12500 to the nearest 10 thousand which remains 10000 instead of printing 12500. :/
I'll run a test quickly with the .to_f and .to_i and see if that makes a difference because as far as I'm concerned, .to_f makes it round decimals. We'll see.
EDIT2:
Well I checked it, and changing .round to .to_f and .to_i didn't make a difference, so I decided I'd remove the math. I had it there so that the player could remotely change variable[552] to fit what they wanted for an interest rate. So if [552]=25, then the interest rate would be 25% by the math that was done. However, the math isn't doing anything at all and apparently ends up equaling 1 or something, then 1*[548] would still equal [548]. There lies the problem.
Anyways, I removed the option for that variable and instead changed it to a static number, so I made it directly like:
$game_variables[548]*=1.25
Now doing this, in the end it works out just how it's supposed to, it's just when there was that math involved that it didn't work.
Can you take a look at the math above in my previous edit and see what might be the cause?