[ERROR] Incorrect # of parameters
Posted: Mon Apr 06, 2009 12:39 pm
Hey, I was wondering what could this mean:
The script should get the distance between the player and the "ObjectivePawn" entity, which is the pawn, that holds the spcript, but instead of that, when I trigger the trigger "objective1" the game crashes.
I was trying to edit a script that Juutis and JAy helped me out for. It's for displaying a flipbook, which shows the direction of a pawn on the screen, I now want to make a text instead of a flipbook, but I got this problem, here's the script:[ERROR] Incorrect # of parameters in command 'DistanceBetweenEntities' in Script 'ObjectivePawn' Order 'execute'
Code: Select all
{
SCREENX [0]
SCREENY [0]
TEXT [lol]
Spawn[ ()
{
Console(true);
LowLevel("execute");
} ]
execute[ ()
{
ThinkTime = 0;
if(GetEventState("objective1"))
{
SCREENX=GetEntityScreenX("ObjectivePawn");
SCREENY=GetEntityScreenY("ObjectivePawn");
TEXT=DistanceBetweenEntities("Player", "ObjectivePawn");
ShowText(0, "", "", TEXT, 6, "", SCREENX, SCREENY, "", 200);
}
} ]
}