Having my game crash & weapon ammo issue
by Nathan Snell · in Torque Game Engine · 08/09/2005 (4:43 pm) · 0 replies
I've run into 2 issues, both of which I cannot figure out... probably because i'm really new to torque. So i'm hoping at least someone will be able to help me with my torque problems :)
EDIT for first issue:
A "fix" for this was apparently to remove the aiPlayer.cs file. After removing that file, that game was able to launch successfully, however, for some reason, I was not able to switch to a team (as i have eXodus's team code implemented). By removing the aiPlayer.cs, it fubars the createPlayer function in game.cs. Any ideas on how to fix this either by being able to use the aiPlayer.cs again or by leaving it out and tweaking the game.cs?
The first, more serious issue, is the starter.fps game i have been modifying now crashes when I try to launch the game. I had made some small changes (trying to add a weapon and get weapon ammo to work) and when i went to test it, it simply would crash every time i tried to launch. I've checked the console.log and the only error in it is an error as it try's to preload an image (that is in the right place). I have no idea what I should do to fix it. I tried undoing the changes I made, but even having done that, it still crashes.
EDIT: Still having issues here.
The second error, serious enough but not compared to not being able to run the game ;)
Getting a new weapon to work. Now, i've gotten the weapon to mount on the player, it's been added to the game (all thanks to CodeSampler.com)... the only thing is that for some reason this weapon doesn't have any ammo. I've gone and done all the right steps as far as I know. I added the new Ammo as an ItemData, linked it to the weapon shapebase, etc. But for some reason, the ammo just doesn't work. The odd thing is, it does work if I use the name of the RifleAmmo which was already in the game.cs. That is, if i create a new ammo type called RifleAmmo (since the rifle stuff was removed and replaced with the crossbow) it works fine. But if i rename it to, say, PistolAmmo, it doesn't work. I've checked everywhere to see if i missed something, but have yet to find anything missed.
Thanks in advance!
EDIT for first issue:
A "fix" for this was apparently to remove the aiPlayer.cs file. After removing that file, that game was able to launch successfully, however, for some reason, I was not able to switch to a team (as i have eXodus's team code implemented). By removing the aiPlayer.cs, it fubars the createPlayer function in game.cs. Any ideas on how to fix this either by being able to use the aiPlayer.cs again or by leaving it out and tweaking the game.cs?
The first, more serious issue, is the starter.fps game i have been modifying now crashes when I try to launch the game. I had made some small changes (trying to add a weapon and get weapon ammo to work) and when i went to test it, it simply would crash every time i tried to launch. I've checked the console.log and the only error in it is an error as it try's to preload an image (that is in the right place). I have no idea what I should do to fix it. I tried undoing the changes I made, but even having done that, it still crashes.
EDIT: Still having issues here.
The second error, serious enough but not compared to not being able to run the game ;)
Getting a new weapon to work. Now, i've gotten the weapon to mount on the player, it's been added to the game (all thanks to CodeSampler.com)... the only thing is that for some reason this weapon doesn't have any ammo. I've gone and done all the right steps as far as I know. I added the new Ammo as an ItemData, linked it to the weapon shapebase, etc. But for some reason, the ammo just doesn't work. The odd thing is, it does work if I use the name of the RifleAmmo which was already in the game.cs. That is, if i create a new ammo type called RifleAmmo (since the rifle stuff was removed and replaced with the crossbow) it works fine. But if i rename it to, say, PistolAmmo, it doesn't work. I've checked everywhere to see if i missed something, but have yet to find anything missed.
Thanks in advance!
About the author