01.02.2011, 16:36
I get the next errors:
5 Errors.
This is the command that I want to make, it's /me command for RP server.
Line 110 is:
Код:
D:\Games\Grand Theft Auto (GTA) San Andreas-HOODLUM\Testovo\gamemodes\testov.pwn(110) : error 017: undefined symbol "cmd" D:\Games\Grand Theft Auto (GTA) San Andreas-HOODLUM\Testovo\gamemodes\testov.pwn(112) : error 017: undefined symbol "sendername" D:\Games\Grand Theft Auto (GTA) San Andreas-HOODLUM\Testovo\gamemodes\testov.pwn(112) : error 017: undefined symbol "sendername" D:\Games\Grand Theft Auto (GTA) San Andreas-HOODLUM\Testovo\gamemodes\testov.pwn(112) : error 029: invalid expression, assumed zero D:\Games\Grand Theft Auto (GTA) San Andreas-HOODLUM\Testovo\gamemodes\testov.pwn(112) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
This is the command that I want to make, it's /me command for RP server.
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmd, "/me", true) == 0) { GetPlayerName(playerid, sendername, sizeof(sendername)); GiveNameSpace(sendername); if(PlayerInfo[playerid][pMaskUse] == 1) { format(sendername, sizeof(sendername), "Stranger_%d", RandMask[playerid]); } new length = strlen(cmdtext); if(Mute[playerid] == 1) { SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced"); return 1; } while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[128]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, "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_PURPLE,COLOR_PURPLE); //printf("%s", string); return 1; } }
Код:
if(strcmp(cmd, "/me", true) == 0)