error 001: expected token: "(", but found ";" ???
#1

How to fix Erro Pawno
bullethole.pwn(97) : error 001: expected token: "(", but found ";"
bullethole.pwn(98 ) : error 001: expected token: ")", but found "public"
bullethole.pwn(98 ) : error 001: expected token: ";", but found "public"
Код:
forward OnPlayerWeaponShot;
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
??
Help me
Reply
#2

forward OnPlayerWeaponShot(playerid);

If it doesn't work try, forward OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ);
Reply
#3

Quote:
Originally Posted by Stuun
Посмотреть сообщение
forward OnPlayerWeaponShot(playerid);

If it doesn't work try, forward OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ);
bullethole.pwn(98 ) : error 025: function heading differs from prototype
Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
How to fix
Reply
#4

Try to remove playerid,
Reply
#5

Quote:
Originally Posted by Stuun
Посмотреть сообщение
Try to remove playerid,
it Doesn't work !
Before remove playerid in public OnPlayerWeaponShot

bullethole.pwn(98 ) : error 025: function heading differs from prototype
bullethole.pwn(105) : error 017: undefined symbol "playerid"
bullethole.pwn(106) : error 017: undefined symbol "playerid"
Reply
#6

wait wait, add it lol i was wrong.

Post the whole code inside that callback
Reply
#7

Quote:
Originally Posted by Stuun
Посмотреть сообщение
wait wait, add it lol i was wrong.

Post the whole code inside that callback
This is my code

Код:
forward OnPlayerWeaponShot(playerid);
public OnPlayerWeaponShot(weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
        if(weaponid == 38 || weaponid == 37 || weaponid == 36 || weaponid == 35) return 1;
    else{
            if(hittype == 0 && fX != 0)
            {
                new Float: A, Float: rX, Float: rY;
                GetXYInFrontOfPlayer(playerid, rX, rY, 5.0);
                GetPlayerFacingAngle(playerid, A);
                        CreateHole(fX, fY, fZ, rX, rY, A-90);
                }
        }
        return 1;
}
Reply
#8

Remove forward OnPlayerWeaponShot(playerid); and be sure you are using 0.3z+ includes.
Reply
#9

Quote:
Originally Posted by Larceny
Посмотреть сообщение
Remove forward OnPlayerWeaponShot(playerid); and be sure you are using 0.3z+ includes.
OK this work
Tks for rep+
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)