/grove and /ballas -
Armando B - 02.08.2012
i need help, i get 4 errors
Code:
if(strcmp(cmdtext, "/grove", true) == 0)
{
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}SERVER: You Have Been Teleported!.");
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"%s Has Joined Grove By Using /grove.",pName);
SendClientMessageToAll(0xFFFFFFAA,string);
SetPlayerPos(playerid,,2494.9758,-1685.5616,13.5118);
return 1;
}
if(strcmp(cmdtext, "/ballas", true) == 0)
{
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}SERVER: You Have Been Teleported!.");
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"%s Has Joined Ballas By Using /ballas.",pName);
SendClientMessageToAll(0xFFFFFFAA,string);
SetPlayerPos(playerid,,1938.9037,-1114.6855,27.4523);
return 1;
}
errors are:
Code:
C:\Documents and Settings\Owner\Desktop\Samp Stuff 2\my scripting\The Server\gamemodes\LS_DM.pwn(226) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Owner\Desktop\Samp Stuff 2\my scripting\The Server\gamemodes\LS_DM.pwn(226) : warning 215: expression has no effect
C:\Documents and Settings\Owner\Desktop\Samp Stuff 2\my scripting\The Server\gamemodes\LS_DM.pwn(226) : warning 215: expression has no effect
C:\Documents and Settings\Owner\Desktop\Samp Stuff 2\my scripting\The Server\gamemodes\LS_DM.pwn(226) : warning 215: expression has no effect
C:\Documents and Settings\Owner\Desktop\Samp Stuff 2\my scripting\The Server\gamemodes\LS_DM.pwn(226) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Owner\Desktop\Samp Stuff 2\my scripting\The Server\gamemodes\LS_DM.pwn(226) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Owner\Desktop\Samp Stuff 2\my scripting\The Server\gamemodes\LS_DM.pwn(226) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Re: /grove and /ballas -
[MM]RoXoR[FS] - 02.08.2012
You had an extra comma
pawn Code:
SetPlayerPos(playerid,2494.9758,-1685.5616,13.5118);
Code:
This forum requires that you wait 120 seconds between posts. Please try again in 17 seconds.
Re: /grove and /ballas -
sidney123 - 02.08.2012
From what I see is that
pawn Code:
SetPlayerPos(playerid,,2494.9758,-1685.5616,13.5118);
SetPlayerPos(playerid,,1938.9037,-1114.6855,27.4523);
Must be:
pawn Code:
SetPlayerPos(playerid,2494.9758,-1685.5616,13.5118);
SetPlayerPos(playerid,1938.9037,-1114.6855,27.4523);
And that this:
pawn Code:
format(string,sizeof string,"%s Has Joined Grove By Using /grove.",pName);
and
pawn Code:
format(string,sizeof string,"%s Has Joined Ballas By Using /ballas.",pName);
must be
pawn Code:
format(string,sizeof(string),"%s Has Joined Grove By Using /grove.",pName);
format(string,sizeof(string),"%s Has Joined Grove By Using /grove.",pName);
The whole code (fixed the things I saw, correct me if I'm wrong of course):
pawn Code:
if(strcmp(cmdtext, "/grove", true) == 0)
{
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}SERVER: You Have Been Teleported!.");
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof(string),"%s Has Joined Grove By Using /grove.",pName);
SendClientMessageToAll(0xFFFFFFAA,string);
SetPlayerPos(playerid,2494.9758,-1685.5616,13.5118);
return 1;
}
if(strcmp(cmdtext, "/ballas", true) == 0)
{
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}SERVER: You Have Been Teleported!.");
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof(string),"%s Has Joined Ballas By Using /ballas.",pName);
SendClientMessageToAll(0xFFFFFFAA,string);
SetPlayerPos(playerid,1938.9037,-1114.6855,27.4523);
return 1;
}