SA-MP Forums Archive
[Ajuda] OnPlayerDeath - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] OnPlayerDeath (/showthread.php?tid=521676)



OnPlayerDeath - Kirikage - 24.06.2014

Acho que ta dando um bug nas pos desse sistema aki sera que alguem me da uma ajuda
PHP код:
C:\Users\Diego\Desktop\PlayAlones\gamemodes\Alones.pwn(663) : warning 219local variable "pPosX" shadows a variable at a preceding level
C
:\Users\Diego\Desktop\PlayAlones\gamemodes\Alones.pwn(663) : warning 219local variable "pPosY" shadows a variable at a preceding level
C
:\Users\Diego\Desktop\PlayAlones\gamemodes\Alones.pwn(663) : warning 219local variable "pPosZ" shadows a variable at a preceding level
C
:\Users\Diego\Desktop\PlayAlones\gamemodes\Alones.pwn(664) : error 035argument type mismatch (argument 2)
C:\Users\Diego\Desktop\PlayAlones\gamemodes\Alones.pwn(668) : warning 213tag mismatch
C
:\Users\Diego\Desktop\PlayAlones\gamemodes\Alones.pwn(668) : warning 213tag mismatch
C
:\Users\Diego\Desktop\PlayAlones\gamemodes\Alones.pwn(668) : warning 213tag mismatch
C
:\Users\Diego\Desktop\PlayAlones\gamemodes\Alones.pwn(668) : warning 213tag mismatch
C
:\Users\Diego\Desktop\PlayAlones\gamemodes\Alones.pwn(668) : warning 213tag mismatch
C
:\Users\Diego\Desktop\PlayAlones\gamemodes\Alones.pwn(668) : warning 213tag mismatch
C
:\Users\Diego\Desktop\PlayAlones\gamemodes\Alones.pwn(668) : warning 213tag mismatch
C
:\Users\Diego\Desktop\PlayAlones\gamemodes\Alones.pwn(663) : warning 203symbol is never used"pPosZ"
C:\Users\Diego\Desktop\PlayAlones\gamemodes\Alones.pwn(663) : warning 203symbol is never used"pPosY"
C:\Users\Diego\Desktop\PlayAlones\gamemodes\Alones.pwn(663) : warning 203symbol is never used"pPosX"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
1 Error

PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
 new 
Float:pPosXFloat:pPosYFloat:pPosZ;
    
GetPlayerPos(playeridpPosXpPosYpPosZ);
    for(new 
i_slot 0gunammoi_slot != 12i_slot++)
    {
        
GetPlayerWeaponData(playeridi_slotgunammo);
        if(
gun != && ammo != 0CreateDroppedGun(gunammopPosX+random(2)-random(2), pPosY+random(2)-random(2), pPosZ);
    }
    return 
1;




Re: OnPlayerDeath - rm0203 - 24.06.2014

Quote:

C:\Users\Diego\Desktop\PlayAlones\gamemodes\Alones .pwn(663) : warning 219: local variable "pPosX" shadows a variable at a preceding level
C:\Users\Diego\Desktop\PlayAlones\gamemodes\Alones .pwn(663) : warning 219: local variable "pPosY" shadows a variable at a preceding level
C:\Users\Diego\Desktop\PlayAlones\gamemodes\Alones .pwn(663) : warning 219: local variable "pPosZ" shadows a variable at a preceding level

Ocorrem por haver um conflito nas variбveis, aparentemente porque elas jб existem com esse nome anteriormente em seu cуdigo.

Tenta remover a linha "new Float:pPosX, Float:pPosY, Float:pPosZ;".


Re: OnPlayerDeath - Kirikage - 24.06.2014

Troquei todas pPos por pPoss Ai deu certo vlw