While compiling...
#1

While compiling this :
Код:
//-------------------------[Fare]---------------------------------------------
if(strcmp(cmd, "/startfare", true) == 0 || strcmp(cmd, "/fare", true) == 0)
{
if (PlayerInfo[playerid][pFaction] == 3)
{
new taxi = GetPlayerVehicleID(playerid);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /startfare [playerID]");
return 1;
}
if(IsStringAName(tmp))
{
giveplayerid = GetPlayerID(tmp);
}
else
{
giveplayerid = strval(tmp);
}
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(!IsATaxi(taxi))
{
SendClientMessage(playerid, COLOR_GRAD2, "Your not in a taxi!");
return 1;
}
if(fared[giveplayerid]!=255)
{
SendClientMessage(playerid, COLOR_GRAD2, "They are already being fared!");
return 1;
}
if(GetPlayerVehicleID(giveplayerid) == taxi)
{
format(string, sizeof(string), "You started a fare on %s, /stopfare /eject or let them leave to stop it",giveplayer);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "%s started a fare of $1 per second, leave the vehicle to stop the fare",sendername);
SendClientMessage(giveplayerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~W~Fare: ~R~$%d",fare[playerid]);
GameTextForPlayer(giveplayerid, string, 50000, 3);
fared[giveplayerid] = playerid;
fare[giveplayerid] = 0;
taxirequest[giveplayerid] = 0;
format(string, sizeof(string), "%s has begun a fare on %s",sendername, giveplayer);
SendJobMessage(COLOR_YELLOW, 1, string);
return 1;
}
}
return 1;
}
//-------------------------[End Fare]---------------------------------------------
if(strcmp(cmd, "/endfare", true) == 0 || strcmp(cmd, "/stopfare", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /endfare [playerID]");
return 1;
}
giveplayerid = strval(tmp);
if (PlayerInfo[playerid][pFaction] != 3)
{
SendClientMessage(playerid, COLOR_GRAD2, "Your not a taxi driver!");
return 1;
}
if(!IsATaxi(GetPlayerVehicleID(playerid)))
{
SendClientMessage(playerid, COLOR_GRAD2, "Your not in a taxi!");
return 1;
}
if(fared[giveplayerid] != playerid)
{
SendClientMessage(playerid, COLOR_GRAD2, "You aren't faring that person!");
return 1;
}
format(string, sizeof(string), "You collected %d from this fare, it was added to your paycheck", fare[giveplayerid]);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "You payed %d for the journey", fare[giveplayerid]);
SendClientMessage(giveplayerid, TEAM_GROVE_COLOR, string);
PlayerInfo[playerid][pPaycheck] += fare[giveplayerid];
AntiHack(giveplayerid, -fare[giveplayerid]);
fared[giveplayerid] = 255;
return 1;

}
Gives me that
Код:
C:\DOCUME~1\Danielo\Desktop\ZRP\SA-MP\GAMEMO~1\crp.pwn(1778) : warning 217: loose indentation
C:\DOCUME~1\Danielo\Desktop\ZRP\SA-MP\GAMEMO~1\crp.pwn(1789) : error 017: undefined symbol "IsStringAName"
C:\DOCUME~1\Danielo\Desktop\ZRP\SA-MP\GAMEMO~1\crp.pwn(1791) : error 017: undefined symbol "GetPlayerID"
C:\DOCUME~1\Danielo\Desktop\ZRP\SA-MP\GAMEMO~1\crp.pwn(1797) : error 017: undefined symbol "giveplayer"
C:\DOCUME~1\Danielo\Desktop\ZRP\SA-MP\GAMEMO~1\crp.pwn(1797) : error 017: undefined symbol "giveplayer"
C:\DOCUME~1\Danielo\Desktop\ZRP\SA-MP\GAMEMO~1\crp.pwn(1797) : error 029: invalid expression, assumed zero
C:\DOCUME~1\Danielo\Desktop\ZRP\SA-MP\GAMEMO~1\crp.pwn(1797) : fatal error 107: too many error messages on one line

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


6 Errors.
Reply
#2

Код:
new giveplayer[MAX_PLAYER_NAME];
if(strcmp(cmd, "/startfare", true) == 0 || strcmp(cmd, "/fare", true) == 0)
{
if (PlayerInfo[playerid][pFaction] == 3)
{
new taxi = GetPlayerVehicleID(playerid);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /startfare [playerID]");
return 1;
}
if(IsStringAName(tmp))
{
giveplayerid = GetPlayerID(tmp);
}
else
{
giveplayerid = strval(tmp);
}
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(!IsATaxi(taxi))
{
SendClientMessage(playerid, COLOR_GRAD2, "Your not in a taxi!");
return 1;
}
if(fared[giveplayerid]!=255)
{
SendClientMessage(playerid, COLOR_GRAD2, "They are already being fared!");
return 1;
}
if(GetPlayerVehicleID(giveplayerid) == taxi)
{
format(string, sizeof(string), "You started a fare on %s, /stopfare /eject or let them leave to stop it",giveplayer);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "%s started a fare of $1 per second, leave the vehicle to stop the fare",sendername);
SendClientMessage(giveplayerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~W~Fare: ~R~$%d",fare[playerid]);
GameTextForPlayer(giveplayerid, string, 50000, 3);
fared[giveplayerid] = playerid;
fare[giveplayerid] = 0;
taxirequest[giveplayerid] = 0;
format(string, sizeof(string), "%s has begun a fare on %s",sendername, giveplayer);
SendJobMessage(COLOR_YELLOW, 1, string);
return 1;
}
}
return 1;
}
//-------------------------[End Fare]---------------------------------------------
if(strcmp(cmd, "/endfare", true) == 0 || strcmp(cmd, "/stopfare", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /endfare [playerID]");
return 1;
}
giveplayerid = strval(tmp);
if (PlayerInfo[playerid][pFaction] != 3)
{
SendClientMessage(playerid, COLOR_GRAD2, "Your not a taxi driver!");
return 1;
}
if(!IsATaxi(GetPlayerVehicleID(playerid)))
{
SendClientMessage(playerid, COLOR_GRAD2, "Your not in a taxi!");
return 1;
}
if(fared[giveplayerid] != playerid)
{
SendClientMessage(playerid, COLOR_GRAD2, "You aren't faring that person!");
return 1;
}
format(string, sizeof(string), "You collected %d from this fare, it was added to your paycheck", fare[giveplayerid]);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "You payed %d for the journey", fare[giveplayerid]);
SendClientMessage(giveplayerid, TEAM_GROVE_COLOR, string);
PlayerInfo[playerid][pPaycheck] += fare[giveplayerid];
AntiHack(giveplayerid, -fare[giveplayerid]);
fared[giveplayerid] = 255;
return 1;
}
that should fix giveplayer error
Reply
#3

Now
Код:
C:\DOCUME~1\Danielo\Desktop\ZRP\SA-MP\GAMEMO~1\crp.pwn(1778) : warning 217: loose indentation
C:\DOCUME~1\Danielo\Desktop\ZRP\SA-MP\GAMEMO~1\crp.pwn(1790) : error 017: undefined symbol "IsStringAName"
C:\DOCUME~1\Danielo\Desktop\ZRP\SA-MP\GAMEMO~1\crp.pwn(1792) : error 017: undefined symbol "GetPlayerID"
C:\DOCUME~1\Danielo\Desktop\ZRP\SA-MP\GAMEMO~1\crp.pwn(1799) : error 017: undefined symbol "sendername"
C:\DOCUME~1\Danielo\Desktop\ZRP\SA-MP\GAMEMO~1\crp.pwn(1799) : error 017: undefined symbol "sendername"
C:\DOCUME~1\Danielo\Desktop\ZRP\SA-MP\GAMEMO~1\crp.pwn(1799) : error 029: invalid expression, assumed zero
C:\DOCUME~1\Danielo\Desktop\ZRP\SA-MP\GAMEMO~1\crp.pwn(1799) : fatal error 107: too many error messages on one line

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


6 Errors.
Reply
#4

I looked at this, it is bad code man, you need more practice. I ain't even gonna try
Reply
#5

Код:
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
if(strcmp(cmd, "/startfare", true) == 0 || strcmp(cmd, "/fare", true) == 0)
{
if (PlayerInfo[playerid][pFaction] == 3)
{
new taxi = GetPlayerVehicleID(playerid);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /startfare [playerID]");
return 1;
}
if(IsStringAName(tmp))
{
giveplayerid = GetPlayerID(tmp);
}
else
{
giveplayerid = strval(tmp);
}
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(!IsATaxi(taxi))
{
SendClientMessage(playerid, COLOR_GRAD2, "Your not in a taxi!");
return 1;
}
if(fared[giveplayerid]!=255)
{
SendClientMessage(playerid, COLOR_GRAD2, "They are already being fared!");
return 1;
}
if(GetPlayerVehicleID(giveplayerid) == taxi)
{
format(string, sizeof(string), "You started a fare on %s, /stopfare /eject or let them leave to stop it",giveplayer);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "%s started a fare of $1 per second, leave the vehicle to stop the fare",sendername);
SendClientMessage(giveplayerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~W~Fare: ~R~$%d",fare[playerid]);
GameTextForPlayer(giveplayerid, string, 50000, 3);
fared[giveplayerid] = playerid;
fare[giveplayerid] = 0;
taxirequest[giveplayerid] = 0;
format(string, sizeof(string), "%s has begun a fare on %s",sendername, giveplayer);
SendJobMessage(COLOR_YELLOW, 1, string);
return 1;
}
}
return 1;
}
//-------------------------[End Fare]---------------------------------------------
if(strcmp(cmd, "/endfare", true) == 0 || strcmp(cmd, "/stopfare", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /endfare [playerID]");
return 1;
}
giveplayerid = strval(tmp);
if (PlayerInfo[playerid][pFaction] != 3)
{
SendClientMessage(playerid, COLOR_GRAD2, "Your not a taxi driver!");
return 1;
}
if(!IsATaxi(GetPlayerVehicleID(playerid)))
{
SendClientMessage(playerid, COLOR_GRAD2, "Your not in a taxi!");
return 1;
}
if(fared[giveplayerid] != playerid)
{
SendClientMessage(playerid, COLOR_GRAD2, "You aren't faring that person!");
return 1;
}
format(string, sizeof(string), "You collected %d from this fare, it was added to your paycheck", fare[giveplayerid]);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "You payed %d for the journey", fare[giveplayerid]);
SendClientMessage(giveplayerid, TEAM_GROVE_COLOR, string);
PlayerInfo[playerid][pPaycheck] += fare[giveplayerid];
AntiHack(giveplayerid, -fare[giveplayerid]);
fared[giveplayerid] = 255;
return 1;
}
wasnt that so obvious?
Reply
#6

Код:
Now that... 
Код:
C:\DOCUME~1\Danielo\Desktop\ZRP\SA-MP\GAMEMO~1\crp.pwn(1778) : warning 217: loose indentation
C:\DOCUME~1\Danielo\Desktop\ZRP\SA-MP\GAMEMO~1\crp.pwn(1791) : error 017: undefined symbol "IsStringAName"
C:\DOCUME~1\Danielo\Desktop\ZRP\SA-MP\GAMEMO~1\crp.pwn(1793) : error 017: undefined symbol "GetPlayerID"
C:\DOCUME~1\Danielo\Desktop\ZRP\SA-MP\GAMEMO~1\crp.pwn(1801) : error 017: undefined symbol "IsATaxi"
C:\DOCUME~1\Danielo\Desktop\ZRP\SA-MP\GAMEMO~1\crp.pwn(1806) : error 017: undefined symbol "fared"
C:\DOCUME~1\Danielo\Desktop\ZRP\SA-MP\GAMEMO~1\crp.pwn(1806) : warning 215: expression has no effect
C:\DOCUME~1\Danielo\Desktop\ZRP\SA-MP\GAMEMO~1\crp.pwn(1806) : error 001: expected token: ";", but found "]"
C:\DOCUME~1\Danielo\Desktop\ZRP\SA-MP\GAMEMO~1\crp.pwn(1806) : error 029: invalid expression, assumed zero
C:\DOCUME~1\Danielo\Desktop\ZRP\SA-MP\GAMEMO~1\crp.pwn(1806) : fatal error 107: too many error messages on one line

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


7 Errors.
Reply
#7

Anyone?
Reply
#8

Help pls?
Reply
#9

All these undefined symbols means you didn't implemented them with your code.
Reply
#10

Quote:
Originally Posted by DONTMESS
Help pls?
seriously. learn to script

warning loose indent?

IM SURE U CAN FIGURE THAT OUT WITH YOUR BRAIN TRUST ME
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)