darkfreaks Posted March 4, 2010 Share Posted March 4, 2010 I have tons of pages of code i am not sure where the problem lies but it is sposed to be when you move to an empty section of the map it is sposed to make it so the kingdom stats are empty therefore you get a new kingdom to settle however at the moment it keeps displaying the current settle kingdom info for 1-2 clicks in every direction then it finally changes. im not sure what could be causing this so im attaching the files i think it may be in. example account: User:Bryce Pass:doom login as me. to see for yourself http://ageofmonarchy.com [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
gwolgamott Posted March 4, 2010 Share Posted March 4, 2010 That's a lot of code to swim through... unfortunately prolly not going to have time to look at that much... but I want to play the game now though... ha. But to try to help you, find the part of the code that creates the new kingdom first.... I think that maybe it's not clearing out old data from a database or something... try before creating a new kingdom resetting all arrays, database variables for previous kingdoms, and any variable you are reusing that has no data that needs to be passed along... I haven't even looked at the code so don't know how this is done but it is my first thought. Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted March 4, 2010 Author Share Posted March 4, 2010 i provided the process.settle file which has the kingdom settle code in it i just dont have a clue why it is doing this or how to fix it. Quote Link to comment Share on other sites More sharing options...
gwolgamott Posted March 4, 2010 Share Posted March 4, 2010 I'll take a look at that specific file and see if anythings jumps at me then. EDIT: well there goes my theory... for the most part. That below should already check for what I was thinking... but still maybe it's not setting itself to zero. Does it in all browsers? I'm just wondering if maybe it's a cache issue? $def_population = 0; $def_food = 0; $def_tax = 0; etc.......... Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted March 4, 2010 Author Share Posted March 4, 2010 function record count from class core: function recordCount($table,$where='') { $sql = 'SELECT COUNT(*) AS jumlah FROM '.$table; if (!empty($where)){ $sql .= ' WHERE '.$where; } $res = mysql_query($sql); return mysql_result($res,0,'jumlah'); } think this could be possibly flawed function wise Quote Link to comment Share on other sites More sharing options...
gwolgamott Posted March 4, 2010 Share Posted March 4, 2010 Ok, just following a debug step is all. Ask the obvious question first was all. I didn't see nothing out of ordinary with the settle file. So maybe it's not your code, well technically that is, does it do it in all browsers (I know already asked that). If yes then limits to issues then it's not browser issue to deal with. If no then find out if caching causing issue with certain browsers. I doubt that's the issue though to be honest just something to check. Other then that run some error checking at random segments of the code just outputting data from the variables just to see if they output what they want when you want them. I'll try to take a deeper look at this later, it's an interesting issue. EDIT: think this could be possibly flawed function wise Try the debug code around that and see if it indeed does what you think the variables are before and after the function. I've got to go for the weekend actually away from the internet . So hopefully someone here can help you. Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted March 4, 2010 Author Share Posted March 4, 2010 i added if !==null and !=="" still didnt solve any issues. And as far as i know it causes the same result in every browser so its not limited to one specific browser Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted March 4, 2010 Author Share Posted March 4, 2010 i think i may have found the problem file just need someone to look though the code and tell me where the problem lies... [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted March 4, 2010 Author Share Posted March 4, 2010 anyone got any ideas Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted March 5, 2010 Author Share Posted March 5, 2010 could someone please take a look at process.update.php and tell me if the problem why the map cordinates are retaining userr data when clicked off of, lays in the update process. Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted March 5, 2010 Author Share Posted March 5, 2010 $c_west= (empty($infoLoc['cannons_west']))? '0' : ($infoLoc['cannons_west']); i'm pretty sure the above code is not always returning empty and this is the problem anyone else agree Quote Link to comment Share on other sites More sharing options...
gwolgamott Posted March 8, 2010 Share Posted March 8, 2010 $c_west= (empty($infoLoc['cannons_west']))? '0' : ($infoLoc['cannons_west']); i'm pretty sure the above code is not always returning empty and this is the problem anyone else agree Um... just got back from my fur-low of the weekend and looked at your code. Not sure if you resolved anything yet. But have you tried using less efficient code to see if it will work. Just for S & G's. Try running isset() tests after you've zeroed everything out and just as a redundant step if it isset then make it zero. Like I said not efficient, but if you think that's the problem and it resolves it with a redundant step then at least you know for sure. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.