C:\Documents and Settings\000\My Documents\ffff\gamemodes\c.pwn(1003) : error 003: declaration of a local variable must appear in a compound block C:\Documents and Settings\000\My Documents\ffff\gamemodes\c.pwn(1003) : error 017: undefined symbol "string" C:\Documents and Settings\000\My Documents\ffff\gamemodes\c.pwn(1003) : warning 215: expression has no effect C:\Documents and Settings\000\My Documents\ffff\gamemodes\c.pwn(1003) : error 001: expected token: ";", but found "]" C:\Documents and Settings\000\My Documents\ffff\gamemodes\c.pwn(1003) : fatal error 107: too many error messages on one line |
CMD:rape(playerid, params[])
{
new targetid;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_RED, "[USAGE]: /rape [Part of Name/Player ID]");
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(IsPlayerInRangeOfPoint(targetid, 5.0, x, y, z))
new string[500];
SetPlayerHealth(playerid, -7);
new playerid[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
new targetid[MAX_PLAYER_NAME];
format(str, sizeof(str), "INFO: You have rape %s!",target);
PlayerTimer[targetid] = SetTimerEx("Rape",3000,true,"i",targetid);
return 1;
}
CMD:cure(playerid, params[])
{
new targetid;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_RED, "[USAGE]: /cure [Part of Name/Player ID]");
new string[500];
new targetid[MAX_PLAYER_NAME];
KillTimer(Rape[playerid]);
SetPlayerHealth(playerid, 100);
return 1;
}
forward Rape(playerid);
public Rape(playerid)
{
SetPlayerHealth(playerid, 0);
KillTimer(Rape[playerid]);
return 1;
}
new targetid[MAX_PLAYER_NAME];
format(str, sizeof(str, "INFO: You have rape %s!",target);
new target[MAX_PLAYER_NAME];
GetPlayerName(targetid, target, sizeof(target));
format(string, sizeof(string), "You have raped %s", target);
C:\Documents and Settings\NightDay\My Documents\ffff\gamemodes\c.pwn(1003) : error 003: declaration of a local variable must appear in a compound block C:\Documents and Settings\1\My Documents\ffff\gamemodes\c.pwn(1003) : error 017: undefined symbol "string" C:\Documents and Settings\1\My Documents\ffff\gamemodes\c.pwn(1003) : warning 215: expression has no effect C:\Documents and Settings\1\My Documents\ffff\gamemodes\c.pwn(1003) : error 001: expected token: ";", but found "]" C:\Documents and Settings\1\My Documents\ffff\gamemodes\c.pwn(1003) : fatal error 107: too many error messages on one line |
new string[500]; |
pawn Код:
pawn Код:
|
CMD:rape(playerid, params[])
{
new targetid;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_RED, "[USAGE]: /rape [Part of Name/Player ID]");
new Float:x, Float:y, Float:z;
GetPlayerPos(targetid, x, y, z);
if(IsPlayerInRangeOfPoint(playerid, 5.0, x, y, z)) {
new string[500];
SetPlayerHealth(playerid, 0);
new target[MAX_PLAYER_NAME];
GetPlayerName(targetid, target, sizeof(target));
format(string, sizeof(string), "INFO: You have rape %s!",target);
PlayerTimer[targetid] = SetTimerEx("Rape",3000,true,"i",targetid); }
else SendClientMessage(playerid, COLOR_RED, "Your message here if player is not near target!");
return 1;
}
CMD:cure(playerid, params[])
{
new targetid;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_RED, "[USAGE]: /cure [Part of Name/Player ID]");
KillTimer(Rape[targetid]);
SetPlayerHealth(targetid, 100);
return 1;
}
pawn Код:
Try this one. Just say if you have more problems, These are just some fews I managed to see and quicly fix them. EDIT: I did many edits, as I saw more and more mistakes, hope this will work now. |
C:\Documents and Settings\NightDay\My Documents\ffff\gamemodes\c.pwn(1006) : error 017: undefined symbol "name" C:\Documents and Settings\0\My Documents\ffff\gamemodes\c.pwn(1006) : error 029: invalid expression, assumed zero C:\Documents and Settings\0\My Documents\ffff\gamemodes\c.pwn(1006) : warning 215: expression has no effect C:\Documents and Settings\0\My Documents\ffff\gamemodes\c.pwn(1016) : error 028: invalid subscript (not an array or too many subscripts): "Rape" C:\Documents and Settings\0\My Documents\ffff\gamemodes\c.pwn(1016) : warning 215: expression has no effect C:\Documents and Settings\0\My Documents\ffff\gamemodes\c.pwn(1016) : error 001: expected token: ";", but found "]" C:\Documents and Settings\0\My Documents\ffff\gamemodes\c.pwn(1016) : error 029: invalid expression, assumed |
CMD:rape(playerid, params[])
{
new targetid;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_RED, "[USAGE]: /rape [Part of Name/Player ID]");
new Float:x, Float:y, Float:z;
GetPlayerPos(targetid, x, y, z);
if(IsPlayerInRangeOfPoint(playerid, 5.0, x, y, z)) {
new string[500];
SetPlayerHealth(playerid, 0);
new target[MAX_PLAYER_NAME];
GetPlayerName(targetid, target, sizeof(target));
format(string, sizeof(string), "INFO: You have rape %s!",target);
PlayerTimer[targetid] = SetTimerEx("Rape",3000,true,"i",targetid); }
else SendClientMessage(playerid, COLOR_RED, "Your message here if player is not near target!");
return 1;
}
CMD:cure(playerid, params[])
{
new targetid;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_RED, "[USAGE]: /cure [Part of Name/Player ID]");
KillTimer(Rape[targetid]);
SetPlayerHealth(targetid, 100);
return 1;
}
GetPlayerName(targetid, target, sizeof(target));
C:\Documents and Settings\NightDay\My Documents\ffff\gamemodes\c.pwn(1016) : error 028: invalid subscript (not an array or too many subscripts): "Rape" C:\Documents and Settings\g\My Documents\ffff\gamemodes\c.pwn(1016) : warning 215: expression has no effect C:\Documents and Settings\j\My Documents\ffff\gamemodes\c.pwn(1016) : error 001: expected token: ";", but found "]" C:\Documents and Settings\d\My Documents\ffff\gamemodes\c.pwn(1016) : error 029: invalid expression, assumed zero C:\Documents and Settings\g\My Documents\ffff\gamemodes\c.pwn(1016) : fatal error 107: too many error messages on one line |
KillTimer(Rape[targetid]); |
CMD:cure(playerid, params[])
{
new targetid;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_RED, "[USAGE]: /cure [Part of Name/Player ID]");
KillTimer(Rape[targetid]);
SetPlayerHealth(targetid, 100);
return 1;
}
new Rape[MAX_PLAYERS];
C:\Documents and Settings\a\My Documents\ffff\gamemodes\c.pwn(82 : error 021: symbol already defined: "Rape" C:\Documents and Settings\s\My Documents\ffff\gamemodes\c.pwn(829) : error 021: symbol already defined: "Rape" C:\Documents and Settings\d\My Documents\ffff\gamemodes\c.pwn(833) : error 010: invalid function or declaration |
forward Rape(playerid); public Rape(playerid) { SetPlayerHealth(playerid, 0); KillTimer(Rape[targetid]); return 1; } |