13.07.2011, 19:26
I got error when im compile , it say "undefined simbol SendCommand" lol , how to define it , or any help please ?
thanks
- Patomaxx
thanks
- Patomaxx
public OnPlayerSpawn(playerid)
{
SetPlayerPos(playerid,x,y,z);
SendCommand("/join");
return 1;
}
#define SendPlayerCommand OnPlayerCommandText
public OnPlayerSpawn(playerid)
{
SetPlayerPos(playerid,x,y,z); // I hope you've defined x, y and z as floats somewhere
SendPlayerCommand(playerid, "/join");
return 1;
}
C:\Documents and Settings\xy\Desktop\SAMP\samp03\gamemodes\walkwoods.pwn(115) : warning 236: unknown parameter in substitution (incorrect #define pattern)
C:\Documents and Settings\xy\Desktop\SAMP\samp03\gamemodes\walkwoods.pwn(115) : warning 236: unknown parameter in substitution (incorrect #define pattern)
C:\Documents and Settings\xy\Desktop\SAMP\samp03\gamemodes\walkwoods.pwn(115) : error 029: invalid expression, assumed zero
C:\Documents and Settings\xy\Desktop\SAMP\samp03\gamemodes\walkwoods.pwn(115) : warning 215: expression has no effect
C:\Documents and Settings\xy\Desktop\SAMP\samp03\gamemodes\walkwoods.pwn(115) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\xy\Desktop\SAMP\samp03\gamemodes\walkwoods.pwn(115) : error 029: invalid expression, assumed zero
C:\Documents and Settings\xy\Desktop\SAMP\samp03\gamemodes\walkwoods.pwn(115) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
public OnPlayerText(playerid, text[])
{
if (strfind(text, "stupid bot") != -1)
{
new string[80], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
SendCommand("/kill");
format(string, sizeof(string), "Hey %s! You are so mean, you make me so sad!", name);
SendChat(string);
}
return 1;
}