SA-MP Forums Archive
Errors :/ - 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)
+--- Thread: Errors :/ (/showthread.php?tid=499425)



Errors :/ - mahmoudalzamalkawy - 08.03.2014

i got errors during compiling the script
Quote:

C:\Documents and Settings\Ayman\Desktop\New Folder\gamemodes\Rolenroleplay.pwn(22107) : warning 217: loose indentation
C:\Documents and Settings\Ayman\Desktop\New Folder\gamemodes\Rolenroleplay.pwn(22274) : warning 217: loose indentation
C:\Documents and Settings\Ayman\Desktop\New Folder\gamemodes\Rolenroleplay.pwn(2228 : warning 217: loose indentation
C:\Documents and Settings\Ayman\Desktop\New Folder\gamemodes\Rolenroleplay.pwn(22316) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Documents and Settings\Ayman\Desktop\New Folder\gamemodes\Rolenroleplay.pwn(22316) : warning 219: local variable "string" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Warnings.

i know how to fix indentation
but this error
Quote:

warning 219: local variable "string" shadows a variable at a preceding level

i can't

that's the lines that gives errors

this command
Quote:

if (strcmp("/pizza", cmdtext, true, 10) == 0)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 44
{
PizzaJob[playerid] = 1;
new name[MAX_PLAYER_NAME], string[48];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "* %s is now a Pizzaboy.", name );
SendClientMessageToAll(COLOR_YELLOW, string);
SetPlayerCheckpoint(playerid,2012.6134,-1729.3796,13.1536,10);
SendClientMessage(playerid,COLOR_YELLOW,"* Follow the red markers and you'll recieve money!");
return 1;
}
SendClientMessage(playerid, COLOR_RED,"You have to be on a pizza bike to start the job!");
}

fix it to me please


Re: Errors :/ - rangerxxll - 08.03.2014

EDIT: Removed.


Re: Errors :/ - GalaxyHostFree - 08.03.2014

Код:
if (strcmp("/pizza", cmdtext, true, 10) == 0)
{
     if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 44
     {
          PizzaJob[playerid] = 1;
          new nname[MAX_PLAYER_NAME], sstring[48];
          GetPlayerName(playerid, nname, sizeof(nname));
          format(sstring, sizeof(sstring), "* %s is now a Pizzaboy.", nname );
          SendClientMessageToAll(COLOR_YELLOW, sstring);
          SetPlayerCheckpoint(playerid,2012.6134,-1729.3796,13.1536,10);
          SendClientMessage(playerid,COLOR_YELLOW,"* Follow the red markers and you'll recieve money!");
          return 1;
      }
      SendClientMessage(playerid, COLOR_RED,"You have to be on a pizza bike to start the job!");
}



Re: Errors :/ - Astralis - 08.03.2014

pawn Код:
if (strcmp("/pizza", cmdtext, true, 10) == 0)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 44
{
PizzaJob[playerid] = 1;
new name22[MAX_PLAYER_NAME], string22[48];
GetPlayerName(playerid, name22, sizeof(name22));
format(string22, sizeof(string22), "* %s is now a Pizzaboy.", name22 );
SendClientMessageToAll(COLOR_YELLOW, string22);
SetPlayerCheckpoint(playerid,2012.6134,-1729.3796,13.1536,10);
SendClientMessage(playerid,COLOR_YELLOW,"* Follow the red markers and you'll recieve money!");
return 1;
}
SendClientMessage(playerid, COLOR_RED,"You have to be on a pizza bike to start the job!");
}



Re: Errors :/ - mahmoudalzamalkawy - 08.03.2014

new error
Quote:

C:\Documents and Settings\Ayman\Desktop\New Folder\gamemodes\Rolenroleplay.pwn(2210 : warning 217: loose indentation
C:\Documents and Settings\Ayman\Desktop\New Folder\gamemodes\Rolenroleplay.pwn(22275) : warning 217: loose indentation
C:\Documents and Settings\Ayman\Desktop\New Folder\gamemodes\Rolenroleplay.pwn(22289) : warning 217: loose indentation
C:\Documents and Settings\Ayman\Desktop\New Folder\gamemodes\Rolenroleplay.pwn(22315) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.




Re: Errors :/ - RyanPetersons - 08.03.2014

pawn Код:
if (strcmp("/pizza", cmdtext, true, 10) == 0)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 44)
{
PizzaJob[playerid] = 1;
new name22[MAX_PLAYER_NAME], string22[48];
GetPlayerName(playerid, name22, sizeof(name22));
format(string22, sizeof(string22), "* %s is now a Pizzaboy.", name22 );
SendClientMessageToAll(COLOR_YELLOW, string22);
SetPlayerCheckpoint(playerid,2012.6134,-1729.3796,13.1536,10);
SendClientMessage(playerid,COLOR_YELLOW,"* Follow the red markers and you'll recieve money!");
return 1;
}
SendClientMessage(playerid, COLOR_RED,"You have to be on a pizza bike to start the job!");
}