2008.05.31, 12:20 PM
Missing Formal Parameter
Another error of which I have no idea of its meaning. A quick google search said that it arises in javascript when you put in a 'var' when you don't need to, like in say: thisfunction(var id).
And the section of my script the error is referring to does involve function variables, but it doesn't look like I'm doing anything wrong:
I'm trying to implement a primary and secondary weapon system here. So I'm not able to use all the built in weapon niceties.
Another error of which I have no idea of its meaning. A quick google search said that it arises in javascript when you put in a 'var' when you don't need to, like in say: thisfunction(var id).
And the section of my script the error is referring to does involve function variables, but it doesn't look like I'm doing anything wrong:
Code:
function playerMessage(obj,subEvent,id)
{
// we are only checking for player_X key
// message here, we can ignore all others
if (subEvent!=DIM3_EVENT_MESSAGE_FROM_KEY_DOWN) return;
// check messages
switch (id) {
case 4: //Secondary Weapon Back
function weaponChange(2);
return;
case 5: //Secondary Weapon Forward
function weaponChange(3);
return;
case 6: //Weapon Fire
function weaponFire(true);
return;
case 7: //Weapon Forward
function weaponChange(1);
return;
case 8: //Weapon Backward
function weaponChange(0);
return;
case 9: //Secondary Weapon Fire
function weaponFire(false);
return;
case 10: // Fire Modifier
// Heck man, I don't even know if I'm using this yet.
return;
}
}