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

Question

Posted

D:\gm-uri\burned.ro\gamemodes\wa-rpg.pwn(13141) : warning 208: function with tag result used before definition, forcing reparse
D:\gm-uri\burned.ro\gamemodes\wa-rpg.pwn(29714) : warning 208: function with tag result used before definition, forcing reparse
D:\gm-uri\burned.ro\gamemodes\wa-rpg.pwn(35699) : warning 208: function with tag result used before definition, forcing reparse
Pawn compiler 3.10.6              Copyright (c) 1997-2006, ITB CompuPhase
	
3 Warnings.
[Finished in 9.7s]

13141:

function Float:GetDistanceBetweenPlayers(p1,p2) {
    new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
    if(!IsPlayerConnected(p1) || !IsPlayerConnected(p2)) return -1.00;
    GetPlayerPos(p1,x1,y1,z1);
    GetPlayerPos(p2,x2,y2,z2);
    return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
}

29714:

function Float:DistanceToPlayer(playerid, targetid) {
    new Float: Pos[3], Float: distance;
    GetPlayerPos(targetid, Pos[0], Pos[1], Pos[2]);
    distance = GetPlayerDistanceFromPoint(playerid, Pos[0], Pos[1], Pos[2]);
    return distance;
}

35699:

function Float:DistanceCameraTargetToLocation(Float:CamX, Float:CamY, Float:CamZ, Float:ObjX, Float:ObjY, Float:ObjZ, Float:FrX, Float:FrY, Float:FrZ) {
    new Float:TGTDistance;
    // get distance from camera to target
    TGTDistance = floatsqroot((CamX - ObjX) * (CamX - ObjX) + (CamY - ObjY) * (CamY - ObjY) + (CamZ - ObjZ) * (CamZ - ObjZ));
    new Float:tmpX, Float:tmpY, Float:tmpZ;
    tmpX = FrX * TGTDistance + CamX;
    tmpY = FrY * TGTDistance + CamY;
    tmpZ = FrZ * TGTDistance + CamZ;
    return floatsqroot((tmpX - ObjX) * (tmpX - ObjX) + (tmpY - ObjY) * (tmpY - ObjY) + (tmpZ - ObjZ) * (tmpZ - ObjZ));
}

Folosesc https://github.com/pawn-lang/compiler. Ms anticipat pwp jos :*

App: Inainte sa folosesc compilerul ala nu-mi dadea nik.

4 answers to this question

Recommended Posts

  • 0
Posted

o sa las raspunsul la aceasta problema chiar daca ai rezolvat.

 

Daca folositi un alt compiler fata de cel default o sa apara acel warning, pentru a il rezolva trebuie sa puneti functiile sub #include

  • 0
Posted
1 oră în urmă, Diversity a spus:

o sa las raspunsul la aceasta problema chiar daca ai rezolvat.

 

Daca folositi un alt compiler fata de cel default o sa apara acel warning, pentru a il rezolva trebuie sa puneti functiile sub #include

Nu neaparat, codul functie trebuie sa fie mai sus decat prima utilizare/apelare a functie.

  • 0
Posted
Acum 37 minute, valivaly96 a spus:

Nu neaparat, codul functie trebuie sa fie mai sus decat prima utilizare/apelare a functie.

 

Acum 1 oră, Diversity a spus:

o sa las raspunsul la aceasta problema chiar daca ai rezolvat.

 

Daca folositi un alt compiler fata de cel default o sa apara acel warning, pentru a il rezolva trebuie sa puneti functiile sub #include

Chiar asta am facut : am mutat aceste 3 functii deasupra primei functii.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.