I can not solve
#1

Can someone help me? please.

Код:
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(1954) : error 028: invalid subscript (not an array or too many subscripts): "GetPlayerTargetDistance"
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(1954) : warning 215: expression has no effect
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(1954) : error 001: expected token: ";", but found "]"
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(1954) : error 029: invalid expression, assumed zero
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(1954) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
PHP код:
            new string0[32];
            
format(string0sizeof(string0), "~w~%d metros"GetPlayerTargetDistance[i]); //error :(
            
TextDrawSetString(SniperDistancia[i], string0); 
Reply
#2

GetPlayerTargetDistance is a function, not an array, right? You should have it like this maybe then..

pawn Код:
new string0[32];
format(string0, sizeof(string0), "~w~%d metros", GetPlayerTargetDistance(i));
TextDrawSetString(SniperDistancia[i], string0);
Reply
#3

Warning?

Quote:

C:\Users\2\2\gamemode\gamemodes\2.pwn(1942) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.

stock GetPlayerTargetDistance(playerid)
{
new targetplayer = GetPlayerTargetPlayer(playerid);
new Float: tgPos[3];

GetPlayerPos(targetplayer, tgPos[0], tgPos[1], tgPos[2]);
new Float: value = GetPlayerDistanceFromPoint(playerid, tgPos[0], tgPos[1], tgPos[2]);

return value; //warning
}

tranks..
Reply
#4

As you're returning a float, the function must have a float tag as well.

pawn Код:
stock Float:GetPlayerTargetDistance(playerid)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)