View Single Post
  #160  
Old 07-29-2013, 01:32 PM
wolfwalkereci
Discordant
 
Join Date: Dec 2005
Posts: 435
Default

Quote:
Originally Posted by cavedude View Post
Oh, I wanted to mention that. Your changes to lootdrop.add.tmpl.php should be reverted. You replaced the default values (which exist only to save on typing for the user) to variables that aren't even defined yet. The input field itself is what creates those variables, so it's referencing a variable it hasn't even submitted yet. PHP is very forgiving of course, but another language like C++ wouldn't like that too much and crash.

This change creates NULLs for the input boxes (since the variable doesn't exist yet), so if you clicked submit without filling out all the boxes the DB would fill with default values, which are 0s. If that's not the problem, then there may be something else going on for you else where.
Ok I am tracking with that. Myself I am in the habit of filling in all the fields with something so I'm not sure if that would be an issue. I'll revert later today and check if not inputing anything would generate a default value (0,0,1,100). -- if so I might just remove the ability to even input anything since every time I do put something in the fields it generates the lootdrop as mindrop through probability with value of 0.

I did take a look at \lib\loot.php and saw in function assign_lootdrop that droplimit, mindrop, multiplier and probability are defined which is why I made the changes to lootdrop.add.tmpl.php
Reply With Quote