SA-MP Forums Archive
How to fix this :( - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to fix this :( (/showthread.php?tid=145251)



How to fix this :( - sekol - 01.05.2010

I AGAIN tryed to make heal command in Carlito's Roleplay.
That's the command:
Код:
if{strcmp(cmd, "/ulecz". true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
      if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 2)
      {
            giveplayerid = ReturnUser(tmp);
            SetPlayerHealth(playerid, 100)
            format(string, sizeof{string{, "*Uzdrowiłeś gracza %s.", giveplayerid);
            SendClientMessage{playerid, COLOR_LIGHTBLUE, string);
            format(string, sizeof(string), "* Zostałeś uzdrowiony przez medyka %s.", playerid);
	    	SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
	    	PlayerPlaySound(giveplayerid, 1150, 0.0, 0.0, 0.0);
	    	{
	    	else
	    	{
	    	  SendClientMessage{playerid, COLOR_RED, "Nie jesteś medykiem !");
		    }
And i get a lot of errors!
Код:
C:\Documents and Settings\Machlik\Pulpit\CRP_0.3\SA-MP\gamemodes\crp.pwn(1196) : error 017: undefined symbol "ShowServerPassword"
C:\Documents and Settings\Machlik\Pulpit\CRP_0.3\SA-MP\gamemodes\crp.pwn(1263) : error 004: function "FixHour" is not implemented
C:\Documents and Settings\Machlik\Pulpit\CRP_0.3\SA-MP\gamemodes\crp.pwn(1305) : error 004: function "KickPlayer" is not implemented
C:\Documents and Settings\Machlik\Pulpit\CRP_0.3\SA-MP\gamemodes\crp.pwn(1322) : error 017: undefined symbol "ClearScreen"
C:\Documents and Settings\Machlik\Pulpit\CRP_0.3\SA-MP\gamemodes\crp.pwn(1323) : error 004: function "ShowScriptStats" is not implemented
C:\Documents and Settings\Machlik\Pulpit\CRP_0.3\SA-MP\gamemodes\crp.pwn(1325) : error 017: undefined symbol "RPName"
C:\Documents and Settings\Machlik\Pulpit\CRP_0.3\SA-MP\gamemodes\crp.pwn(1347) : error 004: function "KickPlayer" is not implemented
C:\Documents and Settings\Machlik\Pulpit\CRP_0.3\SA-MP\gamemodes\crp.pwn(1353) : error 004: function "LoadDynamicFactions" is not implemented
C:\Documents and Settings\Machlik\Pulpit\CRP_0.3\SA-MP\gamemodes\crp.pwn(1354) : error 004: function "LoadDynamicCars" is not implemented
C:\Documents and Settings\Machlik\Pulpit\CRP_0.3\SA-MP\gamemodes\crp.pwn(1355) : error 004: function "LoadCivilianSpawn" is not implemented
C:\Documents and Settings\Machlik\Pulpit\CRP_0.3\SA-MP\gamemodes\crp.pwn(1356) : error 004: function "LoadBuildings" is not implemented
C:\Documents and Settings\Machlik\Pulpit\CRP_0.3\SA-MP\gamemodes\crp.pwn(1357) : error 004: function "LoadHouses" is not implemented
C:\Documents and Settings\Machlik\Pulpit\CRP_0.3\SA-MP\gamemodes\crp.pwn(1358) : error 004: function "LoadBusinesses" is not implemented
C:\Documents and Settings\Machlik\Pulpit\CRP_0.3\SA-MP\gamemodes\crp.pwn(1359) : error 004: function "LoadFactionMaterialsStorage" is not implemented
C:\Documents and Settings\Machlik\Pulpit\CRP_0.3\SA-MP\gamemodes\crp.pwn(1360) : error 004: function "LoadFactionDrugsStorage" is not implemented
C:\Documents and Settings\Machlik\Pulpit\CRP_0.3\SA-MP\gamemodes\crp.pwn(1361) : error 004: function "LoadDrivingTestPosition" is not implemented
C:\Documents and Settings\Machlik\Pulpit\CRP_0.3\SA-MP\gamemodes\crp.pwn(1362) : error 004: function "LoadFlyingTestPosition" is not implemented
C:\Documents and Settings\Machlik\Pulpit\CRP_0.3\SA-MP\gamemodes\crp.pwn(1363) : error 004: function "LoadBankPosition" is not implemented
C:\Documents and Settings\Machlik\Pulpit\CRP_0.3\SA-MP\gamemodes\crp.pwn(1364) : error 004: function "LoadWeaponLicensePosition" is not implemented
C:\Documents and Settings\Machlik\Pulpit\CRP_0.3\SA-MP\gamemodes\crp.pwn(1365) : error 004: function "LoadPoliceArrestPosition" is not implemented
C:\Documents and Settings\Machlik\Pulpit\CRP_0.3\SA-MP\gamemodes\crp.pwn(1366) : error 004: function "LoadPoliceDutyPosition" is not implemented
C:\Documents and Settings\Machlik\Pulpit\CRP_0.3\SA-MP\gamemodes\crp.pwn(1367) : error 004: function "LoadGunJob" is not implemented
C:\Documents and Settings\Machlik\Pulpit\CRP_0.3\SA-MP\gamemodes\crp.pwn(1368) : error 004: function "LoadDrugJob" is not implemented
C:\Documents and Settings\Machlik\Pulpit\CRP_0.3\SA-MP\gamemodes\crp.pwn(1369) : error 004: function "LoadDetectiveJob" is not implemented
C:\Documents and Settings\Machlik\Pulpit\CRP_0.3\SA-MP\gamemodes\crp.pwn(1370) : error 004: function "LoadLawyerJob" is not implemented
C:\Documents and Settings\Machlik\Pulpit\CRP_0.3\SA-MP\gamemodes\crp.pwn(1371) : error 004: function "LoadProductsSellerJob" is not implemented

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
When i delete this command everything compiles fine... WHERE's THE PROBLEM?!


Re: How to fix this :( - aircombat - 01.05.2010

the problem is u use { like is format{string,sizeof{string that's very bad it should be format(string,sizeof(string


Re: How to fix this :( - maij - 01.05.2010

where is the rest of the code? this code doesn't end.
you forgot to place 4 times } on the end.

Also, I use [pawn] instead of
Код:
 statement. It's better.

is this all the code?

ps: even though samp forum indents stuff wrong, be sure to indent it properly inside the script.



Re: How to fix this :( - sekol - 01.05.2010

Now it looks like that:
Код:
	if{strcmp(cmd, "/ulecz". true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
      if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 2)
      {
        giveplayerid = ReturnUser(tmp);
        SetPlayerHealth(playerid, 100)
        format(string, sizeof(string(, "*Uzdrowiłeś gracza %s.", giveplayerid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
        format(string, sizeof(string), "* Zostałeś uzdrowiony przez medyka %s.", playerid);
	    	SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
	    	PlayerPlaySound(giveplayerid, 1150, 0.0, 0.0, 0.0);
	    	{
	    	else
	    	{
	    	  SendClientMessage(playerid, COLOR_RED, "Nie jesteś medykiem !");
				}
			}
		}
	}
Still 26 errors


Re: How to fix this :( - aircombat - 01.05.2010

dude ident ur code and see ur brackets look at that :

format(string, sizeof(string(, "*Uzdrowiłeś gracza %s.", giveplayerid);

it should be :

format(string, sizeof(string), "*Uzdrowiłeś gracza %s.", giveplayerid);


Re: How to fix this :( - sekol - 01.05.2010

Код:
	if{strcmp(cmd, "/ulecz". true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
      if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 2)
      {
        giveplayerid = ReturnUser(tmp);
        SetPlayerHealth(playerid, 100)
        format(string, sizeof(string), "*Uzdrowiłeś gracza %s.", giveplayerid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
        format(string, sizeof(string), "* Zostałeś uzdrowiony przez medyka %s.", playerid);
	    	SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
	    	PlayerPlaySound(giveplayerid, 1150, 0.0, 0.0, 0.0);
	    	{
	    	else
	    	{
	    	  SendClientMessage(playerid, COLOR_RED, "Nie jesteś medykiem !");
				}
			}
		}
	}
Still same problems


Re: How to fix this :( - [DRD]Rodney - 01.05.2010

if{strcmp(cmd, "/ulecz". true) == 0)



Re: How to fix this :( - sekol - 01.05.2010

Quote:
Originally Posted by [DRD
Rodney ]
if{strcmp(cmd, "/ulecz". true) == 0)
Код:
	if(strcmp(cmd, "/ulecz". true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
      if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 2)
      {
        giveplayerid = ReturnUser(tmp);
        SetPlayerHealth(playerid, 100)
        format(string, sizeof(string), "*Uzdrowiłeś gracza %s.", giveplayerid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
        format(string, sizeof(string), "* Zostałeś uzdrowiony przez medyka %s.", playerid);
	    	SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
	    	PlayerPlaySound(giveplayerid, 1150, 0.0, 0.0, 0.0);
	    	{
	    	else
	    	{
	    	  SendClientMessage(playerid, COLOR_RED, "Nie jesteś medykiem !");
				}
			}
		}
	}
Still same


Re: How to fix this :( - aircombat - 01.05.2010

Код:
if(strcmp(cmd, "/ulecz". true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
      if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 2)
      {
        giveplayerid = ReturnUser(tmp);
        SetPlayerHealth(playerid, 100)
        format(string, sizeof(string), "*Uzdrowiłeś gracza %s.", giveplayerid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
        format(string, sizeof(string), "* Zostałeś uzdrowiony przez medyka %s.", playerid);
	    	SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
	    	PlayerPlaySound(giveplayerid, 1150, 0.0, 0.0, 0.0);
	    	{
	    	else
	    	{
	    	  SendClientMessage(playerid, COLOR_RED, "Nie jesteś medykiem !");
				}
			}
		}
	}
    return 1;
    }



Re: How to fix this :( - maij - 01.05.2010

pawn Код:
if(strcmp(cmd, "/ulecz". true) == 0)
{
      if(IsPlayerConnected(playerid))
      {
          if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 2)
          {
              giveplayerid = ReturnUser(tmp);
              SetPlayerHealth(playerid, 100);
              format(string, sizeof(string), "*Uzdrowiłeś gracza %s.", giveplayerid);
              SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
              format(string, sizeof(string), "* Zostałeś uzdrowiony przez medyka %s.", playerid);
              SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
              PlayerPlaySound(giveplayerid, 1150, 0.0, 0.0, 0.0);
          }
         else
         {
             SendClientMessage(playerid, COLOR_RED, "Nie jesteś medykiem !");
         }
      }
      return 1;
}
Forgot closure statement, using else condition on a function, too many unintended brackets, wrong indentation.
But then again, sa-mp forums are shit when it comes to indenting