if(strcmp(cmd, "/me", true) == 0) { if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[96]; 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; } { format(string, sizeof(string), "* %s %s", sendername, result); } ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE); } return 1; } } |
C:\Users\Mijn pc\Desktop\test one.pwn(91) : error 017: undefined symbol "cmd" C:\Users\Mijn pc\Desktop\test one.pwn(95) : error 017: undefined symbol "sendername" C:\Users\Mijn pc\Desktop\test one.pwn(95) : error 017: undefined symbol "sendername" C:\Users\Mijn pc\Desktop\test one.pwn(95) : error 029: invalid expression, assumed zero C:\Users\Mijn pc\Desktop\test one.pwn(95) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors. |
if(strcmp(cmdtext, "/me", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new sendername[25];
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[96];
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;
}
{
format(string, sizeof(string), "* %s %s", sendername, result);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
}
return 1;
}
}
if(strcmp(cmdtext, "/me", true,3) == 0)
{
if(IsPlayerConnected(playerid))
{
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[96];
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;
}
format(string, sizeof(string), "* %s %s", sendername, result);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
return 1;
}
}
}
C:\Users\Mijn pc\Desktop\test one.pwn(9 : error 017: undefined symbol "idx" C:\Users\Mijn pc\Desktop\test one.pwn(100) : error 017: undefined symbol "idx" C:\Users\Mijn pc\Desktop\test one.pwn(100) : warning 215: expression has no effect C:\Users\Mijn pc\Desktop\test one.pwn(102) : error 017: undefined symbol "idx" C:\Users\Mijn pc\Desktop\test one.pwn(104) : error 017: undefined symbol "idx" C:\Users\Mijn pc\Desktop\test one.pwn(106) : error 017: undefined symbol "idx" C:\Users\Mijn pc\Desktop\test one.pwn(107) : error 017: undefined symbol "idx" C:\Users\Mijn pc\Desktop\test one.pwn(107) : warning 215: expression has no effect C:\Users\Mijn pc\Desktop\test one.pwn(109) : error 017: undefined symbol "idx" C:\Users\Mijn pc\Desktop\test one.pwn(112) : error 017: undefined symbol "COLOR_WHITE" C:\Users\Mijn pc\Desktop\test one.pwn(116) : error 017: undefined symbol "string" C:\Users\Mijn pc\Desktop\test one.pwn(116) : error 017: undefined symbol "string" C:\Users\Mijn pc\Desktop\test one.pwn(116) : error 029: invalid expression, assumed zero C:\Users\Mijn pc\Desktop\test one.pwn(116) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 12 Errors. |
C:\Users\Mijn pc\Desktop\test one.pwn(9 : error 017: undefined symbol "idx" C:\Users\Mijn pc\Desktop\test one.pwn(100) : error 017: undefined symbol "idx" C:\Users\Mijn pc\Desktop\test one.pwn(100) : warning 215: expression has no effect C:\Users\Mijn pc\Desktop\test one.pwn(102) : error 017: undefined symbol "idx" C:\Users\Mijn pc\Desktop\test one.pwn(104) : error 017: undefined symbol "idx" C:\Users\Mijn pc\Desktop\test one.pwn(106) : error 017: undefined symbol "idx" C:\Users\Mijn pc\Desktop\test one.pwn(107) : error 017: undefined symbol "idx" C:\Users\Mijn pc\Desktop\test one.pwn(107) : warning 215: expression has no effect C:\Users\Mijn pc\Desktop\test one.pwn(109) : error 017: undefined symbol "idx" C:\Users\Mijn pc\Desktop\test one.pwn(112) : error 017: undefined symbol "COLOR_WHITE" C:\Users\Mijn pc\Desktop\test one.pwn(115) : error 017: undefined symbol "string" C:\Users\Mijn pc\Desktop\test one.pwn(115) : error 017: undefined symbol "string" C:\Users\Mijn pc\Desktop\test one.pwn(115) : error 029: invalid expression, assumed zero C:\Users\Mijn pc\Desktop\test one.pwn(115) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 12 Errors. |
if(!strcmp(cmdtext, "/me", true, 3) && cmdtext[3] == ' ')
{
if(strlen(cmdtext) == 4)
{
SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
return 1;
}
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "* %s %s", str, cmdtext[4]);
SendClientMessageToAll(GetPlayerColor(playerid), str);
return 1;
}