Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×

Question

Posted (edited)

Problema intalnita (descriere): Cand compilez gamemode-ul imi apare eroarea: 
Ero(area / rile) / warning-(ul / urile): error 017: undefined symbol "GetPlayerPos"
Liniile de cod / sursa / script-ul(obligatoriu): 

public Float:GetDistance(playerid, Float:x, Float:y)
{
    new Float:oldposx, Float:oldposy, Float:oldposz;
    new Float:tempposx, Float:tempposy, Float:tempposz;
    GetPlayerPos(playerid, oldposx, oldposy, oldposz);
    tempposx = (oldposx -x);
    tempposy = (oldposy -y);
    tempposz = (oldposz -z);
    if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{

 


Imagini / Video (optional): -
Ati incercat sa rezolvati singur?: Incerc sa rezolv asta de cam 2-3 zile.

Mai am la inceputul gamemode-ului codul

PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
return 0;
}

Si la acest cod am aceiasi eroare.

 

P.S. Mi-au aparut aceste erori dupa ce am editat Checkpoint-uriile de la DMV

Edited by Mr_SkyRay

5 answers to this question

Recommended Posts

  • 0
Posted

Poate functia a fost redenumita undeva prin include-uri, verifica a_players.inc.

242086.png

  • 0
Posted (edited)

Vad ca in include, functia e definita GetPlayerPos ...

Incearca asa:

 

public Float:GetDistance(playerid, Float:x, Float:y)
{
    new Float:oldposx, Float:oldposy, Float:oldposz;
    new Float:tempposx, Float:tempposy, Float:tempposz;
    GetPlayerPos(playerid, oldposx, oldposy, oldposz);
    tempposx = (oldposx -x);
    tempposy = (oldposy -y);
    tempposz = (oldposz -z);
    if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)
    {
      return 1;
    }
    return 0;
}

si

PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
    new Float:oldposx, Float:oldposy, Float:oldposz;
    new Float:tempposx, Float:tempposy, Float:tempposz;
    GetPlayerPos(playerid, oldposx, oldposy, oldposz);
    tempposx = (oldposx -x);
    tempposy = (oldposy -y);
    tempposz = (oldposz -z);
    if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
    {
        return 1;
    }
    return 0;
}

 

Edited by KnowN
  • Upvote 1

242086.png

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.