#1

Hi
i did a /exit and i got error
pawn Код:
if(strcmp(cmd, "/exit", true) == 0)
{
   if(PlayerToPointStripped(2, playerid,238.5380,139.0598,1003.0234,))
    {
    SetPlayerPos(playerid,2795.4570,-1619.4171,10.9219)
    SetPlayerInterior(playerid, 3);
    }
    return 1;
}
the error:
C:\Program Files\San Andreas\сшбш\gamemodes\M-RP.pwn(26879) : error 029: invalid expression, assumed zero
The line with the error:
pawn Код:
if(PlayerToPointStripped(2, playerid,238.5380,139.0598,1003.0234,))
Reply
#2

if(PlayerToPointStripped(2, playerid,238.5380,139.0598,1003.0234,))

I see your prbobably gonna get an error here because its simply not complete. It seems that you forgot the final cordinate
Reply
#3

pawn Код:
if(strcmp(cmd, "/exit", true) == 0)
{
   if(PlayerToPointStripped(2, playerid,238.5380,139.0598,1003.0234))
   {
       SetPlayerPos(playerid,2795.4570,-1619.4171,10.9219)
       SetPlayerInterior(playerid, 3);
   }
       return 1;
}
Try that. If it doesnt work, i have another idea.
Reply
#4

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 2.0, 238.5380,139.0598,1003.0234))
{
    SetPlayerPos(playerid,2795.4570,-1619.4171,10.9219)
    SetPlayerInterior(playerid, 3);
}
Try that if my above code does not work.
Reply
#5

What kind of error. Just 'error' is not enough for us. Why you don't use the code I've placed with IsPlayerInRangeOfPoint. Then you just need to use those parameters

Код:
(playerid, Float:range, Float:x, Float:y, Float:z)
Reply
#6

Quote:
Originally Posted by lewismichaelbbc
Посмотреть сообщение
pawn Код:
if(strcmp(cmd, "/exit", true) == 0)
{
   if(PlayerToPointStripped(2, playerid,238.5380,139.0598,1003.0234))
    {
    SetPlayerPos(playerid,2795.4570,-1619.4171,10.9219)
    SetPlayerInterior(playerid, 3);
    }
    return 1;
}
Try that. If it doesnt work, i have another idea.
You should know better than to give an answer with that kind of indentation!

pawn Код:
if(strcmp(cmd, "/exit", true) == 0)
{
    if(PlayerToPointStripped(2, playerid,238.5380,139.0598,1003.0234))
    {
        SetPlayerPos(playerid,2795.4570,-1619.4171,10.9219)
        SetPlayerInterior(playerid, 3);
    }
    return 1;
}

This requires the Angle, The X Float, The Y Float and the Z Float.

You must have those there
Reply
#7

3 warnings
C:\Program Files\San Andreas\סרבר\M-RP.pwn(2688 : warning 202: number of arguments does not match definition
C:\Program Files\San Andreas\סרבר\M-RP.pwn(2688 : warning 202: number of arguments does not match definition
C:\Program Files\San Andreas\סרבר\M-RP.pwn(2688 : warning 202: number of arguments does not match definition
Reply
#8

Quote:

3 warnings
C:\Program Files\San Andreas\סרבר\M-RP.pwn(2688 : warning 202: number of arguments does not match definition
C:\Program Files\San Andreas\סרבר\M-RP.pwn(2688 : warning 202: number of arguments does not match definition
C:\Program Files\San Andreas\סרבר\M-RP.pwn(2688 : warning 202: number of arguments does not match definition

Show the code you did and only get X - Y - Z Co-ordinates not the forth one
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)