C:\Users\Abdullah420\Desktop\Headshot.pwn(30) : error 017: undefined symbol "message" C:\Users\Abdullah420\Desktop\Headshot.pwn(30) : error 017: undefined symbol "message" C:\Users\Abdullah420\Desktop\Headshot.pwn(30) : error 029: invalid expression, assumed zero C:\Users\Abdullah420\Desktop\Headshot.pwn(30) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. |
#include <a_samp> #define FILTERSCRIPT public OnFilterScriptInit() { return 1; } public OnFilterScriptExit() { return 1; } public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart) { if(issuerid != INVALID_PLAYER_ID) { if(IsPlayerConnected(issuerid)) { if(weaponid == 33 || weaponid == 34 || weaponid == 33 || weaponid == 34) { if(bodypart == 9) { SetPlayerHealth(playerid, 0); GameTextForPlayer(issuerid,"~r~Headshot",2000,3); PlayerPlaySound(issuerid, 17802, 0.0, 0.0, 0.0); GameTextForPlayer(playerid,"~r~Headshot",2000,3); PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0); format(message, sizeof(message), "{FF7700}%s has been killed in a Headshot by %s {FF7700}", playerName, otherID); SendClientMessageToAll(COLOR_ORANGE, message); } } } } return 1; } |
new message[80];
#include < a_samp >
#define FILTERSCRIPT
public OnFilterScriptInit() {
return 1;
}
public OnFilterScriptExit() {
return 1;
}
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
if (issuerid != INVALID_PLAYER_ID) {
if (weaponid == 33 || weaponid == 34 || weaponid == 33 || weaponid == 34) {
if (bodypart == 9)
{
SetPlayerHealth(playerid, 0.0);
GameTextForPlayer(issuerid,"~r~Headshot",2000,3);
PlayerPlaySound(issuerid, 17802, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid,"~r~Headshot",2000,3);
PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0);
new message[80];
format(message, sizeof(message), "{FF7700}%s has been killed in a Headshot by %s {FF7700}", playerName, otherID);
SendClientMessageToAll(COLOR_ORANGE, message);
}
}
}
return 1;
}
Indentation.
You missed defining message PHP код:
PHP код:
|
C:\Users\hp\Desktop\Headshot.pwn(31) : error 017: undefined symbol "playerName" C:\Users\hp\Desktop\Headshot.pwn(32) : error 017: undefined symbol "COLOR_ORANGE" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors. |
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart) { if (issuerid != INVALID_PLAYER_ID) { if (weaponid == 33 || weaponid == 34 || weaponid == 33 || weaponid == 34) { if (bodypart == 9) { new playerName[MAX_PLAYER_NAME]; GetPlayerName(playerid, playerName, sizeof(playerName); SetPlayerHealth(playerid, 0.0); GameTextForPlayer(issuerid,"~r~Headshot",2000,3); PlayerPlaySound(issuerid, 17802, 0.0, 0.0, 0.0); GameTextForPlayer(playerid,"~r~Headshot",2000,3); PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0); new message[80]; format(message, sizeof(message), "{FF7700}%s has been killed in a Headshot by %s {FF7700}", playerName, otherID); SendClientMessageToAll(COLOR_ORANGE, message); } } } return 1; }
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart) { if (issuerid != INVALID_PLAYER_ID) { if (weaponid == 33 || weaponid == 34 || weaponid == 33 || weaponid == 34) { if (bodypart == 9) { new playerName[MAX_PLAYER_NAME]; GetPlayerName(playerid, playerName, sizeof(playerName); SetPlayerHealth(playerid, 0.0); GameTextForPlayer(issuerid,"~r~Headshot",2000,3); PlayerPlaySound(issuerid, 17802, 0.0, 0.0, 0.0); GameTextForPlayer(playerid,"~r~Headshot",2000,3); PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0); new message[80]; format(message, sizeof(message), "{FF7700}%s has been killed in a Headshot by %s {FF7700}", playerName, otherID); SendClientMessageToAll(COLOR_ORANGE, message); } } } return 1; } #define COLOR_ORANGE 0xFF4500AA |
C:\Users\hp\Desktop\Headshot.pwn(32) : error 017: undefined symbol "playerName"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
PHP код:
|
Did you ever script something or you are just copy/paste codes you find on the web? You don't even try to understand what this error means. You are just asking for solving them, which make no sense.
|