SA-MP Forums Archive
Errorrr - 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: Errorrr (/showthread.php?tid=90063)



Errorrr - Sal_Kings - 05.08.2009

Код:
public OnPlayerEnterCheckpoint(playerid)
{

  DisablePlayerCheckpoint(playerid);
  SendClientMessage(playerid,COLOR_GREEN,"Now get in a Garbage Truck if there arent any you must wait.");
  SendClientMessage(playerid,COLOR_GREEN,"Slowly drive down the road to the checkpoint and you will be payed.");
  SetPlayerCheckpoint(playerid, 2568, 1145, 10, 3);
  return 1;
}
  
  
  SendClientMessage(playerid,COLOR_GREEN,"Thanks for delivering the trash, Heres 5000");
  GivePlayerMoney(playerid, 5000);
  return 1;
}

  return 0;
}
Код:
C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\_gamemodes__gamemodes_SalsTestingGrounds.pwn(861) : error 021: symbol already defined: "SendClientMessage"
C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\_gamemodes__gamemodes_SalsTestingGrounds.pwn(863) : error 010: invalid function or declaration
C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\_gamemodes__gamemodes_SalsTestingGrounds.pwn(866) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.



Re: Errorrr - JaTochNietDan - 05.08.2009

Those functions need to be under something, they can't just be hanging around in the script

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
  DisablePlayerCheckpoint(playerid);
  SendClientMessage(playerid,COLOR_GREEN,"Now get in a Garbage Truck if there arent any you must wait.");
  SendClientMessage(playerid,COLOR_GREEN,"Slowly drive down the road to the checkpoint and you will be payed.");
  SetPlayerCheckpoint(playerid, 2568, 1145, 10, 3);
  SendClientMessage(playerid,COLOR_GREEN,"Thanks for delivering the trash, Heres 5000");
  GivePlayerMoney(playerid, 5000);
  return 1;
}