Help - 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: Help (
/showthread.php?tid=505567)
Help -
ChromeMenu - 09.04.2014
Код:
new tele_Enabled[MAX_PLAYERS]; // Global scope
public OnPlayerClickMap(playerid, FLoat:fX, Float:fY, Float:fZ) //error 025: function heading differs from prototype
{
if(tele_Enabled[playerid == 1 && PlayerInfo[playerid][pAdmin] >= 2)
{
SetPlayerPosFindZ(playerid, fX, fY, fZ); //warning 213: tag mismatch
}
else break; //error 024: "break" or "continue" is out of context
return 1;
}
CMD:togglemaptp(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, WHITE, "ERR: You cannot use this command!"): //error 001: expected token: ";", but found ":" & error 029: invalid expression, assumed zero & warning 215: expression has no effect
if(tele_Enabled[playerid] == 0) //error 001: expected token: ";", but found "if" & fatal error 107: too many error messages on one line
{
tele_Enabled[playerid] = 1;
SendClientMessage(playerid, WHITE, "You have enabled map teleporting."):
}
else
{
tele_Enabled[playerid] = 0;
SendClientMessage(playerid, WHITE, "You have disabled map teleporting.");
}
return 1;
}
Код:
error 025: function heading differs from prototype
error 001: expected token: "]", but found ")"
warning 213: tag mismatch
error 024: "break" or "continue" is out of context
error 001: expected token: ";", but found ":"
error 029: invalid expression, assumed zero
warning 215: expression has no effect
error 001: expected token: ";", but found "if"
fatal error 107: too many error messages on one line
Re: Help -
cuchipkg - 09.04.2014
where line error ?
Re: Help -
awsomedude - 09.04.2014
change
Код:
if(tele_Enabled[playerid == 1 && PlayerInfo[playerid][pAdmin] >= 2)
To
Код:
if(tele_Enabled[playerid] == 1 && PlayerInfo[playerid][pAdmin] >= 2)
also instead of else break; try doing else return 0;
And you added a : here so remove it and add a semicolon ;
Код:
return SendClientMessage(playerid, WHITE, "ERR: You cannot use this command!");
Re: Help -
cuchipkg - 09.04.2014
code
Код HTML:
SendClientMessage(playerid, WHITE, "You have enabled map teleporting."):
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, WHITE, "ERR: You cannot use this command!"):
change
Код HTML:
SendClientMessage(playerid, WHITE, "You have enabled map teleporting.");
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, WHITE, "ERR: You cannot use this command!");{
Re: Help -
ChromeMenu - 09.04.2014
All of the errors are in the script, so look at them now