FAQ/Debugging:
I don't know a whole lot about coding and debugging since i just restarted programming about 3 days ago after a 4+year break, but i'll do what i can (and i'm sure others will chip in too if/once they read your questions)
Common problems i've encountered:
Q: Ok, so i made up my merchant_id, and i created a whole new custom merchant.... but when i source it like you said i get a whole lot of "Error duplicate entry" lines, whats going on?
A: This means you are trying to source a Merchant_ID that already exsists... this could be caused by either you picked an ID that already exsisted (i started with 56007 since i am pretty sure theres nothing after that in the PEQ DB) or you already sourced that ID at least once, which 'created' it, and thus you're trying to source over an already exsisting ID.
To fix this is simple, but dangerous... if you are absolutely certain that the merchant_id is of no use to you, simply delete it from the field by typing
Quote:
delete * from merchantlist where merchant_id = (merchant_id you want to get rid of);
|
This will kill all input of this merchant_id, however this is permenant, and could be pretty annoying if you accidently just wiped out a general merchant and now all the general merchants in the game are selling your new customized merchant item tables instead of the food and water most newbies are expecting there... My suggestion; simply change the merchant_id you're trying to source in to something else.
Q: I'm having trouble getting effects on my DB to work... i do everything exactly as everyone says to, but it doesn't seem to do anything, one way or the other... what have i done wrong?!
A: Sometimes, especially with linux boxes that aren't rebooted often, things get mysteriously stashed somewhere and don't leave... i learned this one the hardway, was driving me nuts for days until i finally physically restarted my computer to force a re-write to get things to all work out...
Before reaching for that power button however, make sure the changes you made actually took effect. You can do this by simply selecting the field you wished to change to make sure it's indeed changed to what you wished.
Take, for example, that you tried to reset item costs, and then log in and find things not changed at all... go to your mysql cmd line and type;
Quote:
Select cost,merchantprice from items where name = '(name of item you know the price of)';
|
This should pull up the merchantprice and the cost of the item, and if you're like me and reset them both (especially as i reset merchantprice to equal the cost) things should become real clear real fast if the change took effect. If these numbers do NOT match the value they should (i.e. look alot like the value you see them for in the regular game, not your custom price) then something got screwed up along the way between the writing of the code and the sourcing/updating of the DB. I'd recommend going back through and taking a look at the .txt or .sql file you sourced in (the advantage of doing it this way), or if you simply did an update command, maybe trying it again (you may have gotten a syntax error so the equation never ran). However this could exsasberate the problem, so do so at your own risk.
The other option is that the values are indeed what they are suppose to be but don't seem to be doing anything for you even though they are there stareing you in the face on teh computer screen... This is what i was talking about earlier, where sometimes the previous values get stored somewhere and never updated for whatever reason, even despite a sever reboot (yesterday i left my server down 8 hours after making a change and it still didn't stick when i booted it back up) Try to reboot the server, leaving it down for about 5 minutes between shutting it down and starting it up... or if it's not an integral part of your network (like it is for me) you can skip that and simply power it off, count to fifteen, and power it on... if all else fails, this will reset all those crazy residual cached things (And for those that know what they're doing, i tried a sync as well and still didn't do anything for me... /shrug)
Q: Wow, this is the best thing ever, can i put this on my website?
A: Yes. (now if only someone would ask this! hehe ego-stroke!)
More to come later, as people ask me questions i'll try to throw up the more "Frequently asked" ones on this... who woulda thought?