AAAARGH!!!! Please help! For some reason the console pops up when I fire, touch something etc. Please look at my player script! There is also a screenshot in the download.
Download
Sam Shiels Wrote:AAAARGH!!!! Please help! For some reason the console pops up when I fire, touch something etc. Please look at my player script! There is also a screenshot in the download.
Download
What does it say on the console? It's probably an error. In the setup xml file, there's a option to turn off error pop-ups, but I wouldn't recommend that (you want to find the errors first.)
[>] Brian
Sam Shiels Wrote:AAAARGH!!!! Please help! For some reason the console pops up when I fire, touch something etc. Please look at my player script! There is also a screenshot in the download.
Download
Code:
// redraw the weapon display
redrawWeaponDisplay(obj);
You don't have a function called redrawWeaponDisplay in your script, so don't use it.
Remove all the redrawWeaponDisplay(obj); lines and it should work. (Or add a function called redrawWeaponDisplay)
It says stuff like collide is not defined and redraweapondisplay(obj) is not defined. AND playerMessage(obj) etc.
You removed a lot of functions from the script, but you still call them all the time.
Fix that, and it will work.
No I didn't. I still have them in the script.

Nope.
redrawWeaponDisplay is NOT in the script you uploaded.
Fix that one first, and then see if there are any other errors.
Well there is playerfire and playermessage. Should I really delete redraweapondisplay?
Delete every line that says
Code:
redraweapondisplay(obj);
OR
make a
Code:
function redraweapondisplay(obj)
{
}

I'm going to have to look all these threads over and come up with a FAQ like tutorial that explains common debugging techniques and how to fix common errors (like missing functions, above.) To some of us it's rather obvious, but to beginners it can be confusing, it might help to have a "see something like this" ... then the solution is something like "this".
[>] Brian