Jump to content
  • 0

Ajutor Neeaparat


Davidoff7776

Question

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.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
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.

Link to comment
Share on other sites

  • 0
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.