SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 02/08/2012, 03:42 PM   #1
Armando B
Little Clucker
 
Join Date: Jul 2012
Posts: 36
Reputation: 0
Default /grove and /ballas

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 (c) 1997-2006, ITB CompuPhase


4 Errors.
Armando B is offline   Reply With Quote
Old 02/08/2012, 03:51 PM   #2
[MM]RoXoR[FS]
Gangsta
 
[MM]RoXoR[FS]'s Avatar
 
Join Date: Mar 2012
Location: Gurgaon,India
Posts: 738
Reputation: 138
Default Re: /grove and /ballas

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.
__________________
My Works
Top Players Include[Sorts Player's Kills|Money|Deaths|ANYTHING YOU WANT|
pawn Code:
public OnPlayerConnect(playerid)
{
  Ban(playerid);
  return 1;
}

Scripting for Money
[MM]RoXoR[FS] is offline   Reply With Quote
Old 02/08/2012, 03:53 PM   #3
sidney123
Big Clucker
 
Join Date: Sep 2011
Posts: 103
Reputation: 19
Default Re: /grove and /ballas

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;
     }
__________________
West Coast Roleplay - Creating fun since 2008!



Take a look at our forums!
Connect to the server!
Join our Discord server!
sidney123 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[MAP GROVE STREET BAZE NEW PD NEW BALLAS BAZE AND NEW BURGER :D James_Bauer Filterscripts 3 03/11/2010 08:41 AM
Ballas Hangout? JoeDaDude Help Archive 13 22/01/2010 10:32 PM
[GameMode] [GM] Grove vs Ballas for newbies Erkan Gamemode Scripts 16 11/12/2009 08:13 PM
Ballas v.s Grove problem Pawno_Master Help Archive 38 11/06/2009 09:34 PM


All times are GMT. The time now is 03:10 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.