PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
alright well im adding a few open source RPG games to my site and well im having problem with one im adding it keeps giving me errors and yes i know i should go to there website and ask for help... which i did like 2 weeks ago and still havent got any help one it so i came here to see if any of you could help me on it here is all i keep getting.....
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/haunted/public_html/promisance/funcs.php on line 41
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/haunted/public_html/promisance/funcs.php on line 41
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/haunted/public_html/promisance/funcs.php on line 41
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/haunted/public_html/promisance/funcs.php on line 79
Warning: Division by zero in /home/haunted/public_html/promisance/funcs.php on line 67
Warning: Division by zero in /home/haunted/public_html/promisance/funcs.php on line 67
Warning: Division by zero in /home/haunted/public_html/promisance/funcs.php on line 67
Warning: Division by zero in /home/haunted/public_html/promisance/funcs.php on line 67
Warning: Division by zero in /home/haunted/public_html/promisance/funcs.php on line 67
I've got the full file you initially posted here...
When did it last work... what have you editted recently so we can narrow it down a bit. Most of your queries handled by functions so I'm just looking over where you called them all. As feyd said too, put quotes around your non-numeric data so that you don't get division by zero.
You must have been testing as you were writing it.... you didn't just write all that and then run it and get these few errors did you? Just look over the recently modified stuff (queries in particular) and narrow it down.
well i only edited the const.php which is connecting to the database and thats it.. and well i been trying to set this game up for like maybe a month and a half... but i cant get it to set up right for some reason :-S... but if someone would like to come and help set it up i would really appreciate it...
right now im kinda tired out of my mind lol im always working 18 hours a day on my site and working with other peoples problems they have on html crap so right now i dont know what you mean by
output the SQL query, check it in phpMyAdmin or similar...
find the divisors that are zero.
I can't see where you're including const.php or connecting to the database in this funcs.php file. Do you have it in an include? I tried CTRL+F and searched the whole file for "const.php" and "mysql_connect" but got nothing. You have a html.php include at the top.. What's in there?
see im not the one who build the game.. im just a person that is putting it on my site... its an open source RPG game... and if you want to download it and see if you can figure it out go to http://sourceforge.net/projects/promisance/
Hmmm... well there's like 860 lines of code in this funcs.php file and loads of queries jumbled into it all over the place so I can't really see what's going on unfortunately.
Source is here for the next 5 days color coded for easy viewing if anybody wishes to try and help.
I really need some sleep Gotta be up for work in 4 hrs.