if(!strcmp(cmdtext, "/me", true, 3)) // 3 is the length of /me { if(!cmdtext[3])return SendClientMessage(playerid, 0xFF66FFAA, "USAGE: /me [action]"); new str[128]; GetPlayerName(playerid, str, sizeof(str)); format(str, sizeof(str), "* %s %s", str, cmdtext[4]); SendClientMessageToAll(0xFF66FFAA, str); return 1; }
forward PlayerActionMessage(playerid,Float:radius,message[]); forward ProxDetectorS(Float:radi, playerid, targetid);
#define COLOR_PURPLE 0xC2A2DAAA
public PlayerActionMessage(playerid,Float:radius,message[]) { new string[128]; format(string, sizeof(string), "* %s %s", GetPlayerNameEx(playerid), message); ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); PlayerActionLog(string); return 1; } public ProxDetectorS(Float:radi, playerid, targetid) { if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid)) { new Float:posx, Float:posy, Float:posz; new Float:oldposx, Float:oldposy, Float:oldposz; new Float:tempposx, Float:tempposy, Float:tempposz; GetPlayerPos(playerid, oldposx, oldposy, oldposz); //radi = 2.0; //Trigger Radius GetPlayerPos(targetid, posx, posy, posz); tempposx = (oldposx -posx); tempposy = (oldposy -posy); tempposz = (oldposz -posz); if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) { if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(targetid)) { return 1; } } } return 0; }
if(strcmp(cmd, "/me", true) == 0) { if(IsPlayerConnected(playerid)) { new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_WHITE, "(USAGE) /me [action]"); return 1; } new form[128]; format(form, sizeof(form), "%s",result); PlayerActionMessage(playerid,15.0,form); } return 1; }
(182) : error 017: undefined symbol "idx" (184) : error 017: undefined symbol "idx" (184) : warning 215: expression has no effect (186) : error 017: undefined symbol "idx" (188) : error 017: undefined symbol "idx" (190) : error 017: undefined symbol "idx" (191) : error 017: undefined symbol "idx" (191) : warning 215: expression has no effect (193) : error 017: undefined symbol "idx" (264) : error 017: undefined symbol "GetPlayerNameEx" (265) : error 017: undefined symbol "ProxDetector" (266) : error 017: undefined symbol "PlayerActionLog"
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5) { if(IsPlayerConnected(playerid)) { new Float:posx, Float:posy, Float:posz; new Float:oldposx, Float:oldposy, Float:oldposz; new Float:tempposx, Float:tempposy, Float:tempposz; GetPlayerPos(playerid, oldposx, oldposy, oldposz); //radi = 2.0; //Trigger Radius for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(!BigEar[i]) { GetPlayerPos(i, posx, posy, posz); tempposx = (oldposx -posx); tempposy = (oldposy -posy); tempposz = (oldposz -posz); //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz); if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16))) { SendClientMessage(i, col1, string); } else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8))) { SendClientMessage(i, col2, string); } else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4))) { SendClientMessage(i, col3, string); } else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2))) { SendClientMessage(i, col4, string); } else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) { SendClientMessage(i, col5, string); } } else { SendClientMessage(i, col1, string); } } } }//not connected return 1; }
if(strcmp(cmd, "/me", true) == 0) { if(IsPlayerConnected(playerid)) { new idx; new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_WHITE, "(USAGE) /me [action]"); return 1; } new form[128]; format(form, sizeof(form), "%s",result); ProxDetector(20.0, playerid, form, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); } return 1; }
Originally Posted by AdrianX9
Sorry Samuel for the extra error
![]() |
C:\Users\hamza & yassine\Desktop\LV-RP\Gamemodes\LV-RP.pwn(275) : error 017: undefined symbol "BigEar" C:\Users\hamza & yassine\Desktop\LV-RP\Gamemodes\LV-RP.pwn(275) : warning 215: expression has no effect C:\Users\hamza & yassine\Desktop\LV-RP\Gamemodes\LV-RP.pwn(275) : error 001: expected token: ";", but found "]" C:\Users\hamza & yassine\Desktop\LV-RP\Gamemodes\LV-RP.pwn(275) : error 029: invalid expression, assumed zero C:\Users\hamza & yassine\Desktop\LV-RP\Gamemodes\LV-RP.pwn(275) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.