SA-MP Forums Archive
my own /dropcar - 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: my own /dropcar (/showthread.php?tid=365258)



my own /dropcar - Armando B - 02.08.2012

i was playing around and made a /dropcar and get 1 error?

Код:
     if(strcmp(cmdtext, "/dropcar", true) == 0)
     {
          SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}SERVER: Drop The Car Off At The Checkpoint!");
          SetPlayerCheckpoint(playerid, 115,2699.4993,-2226.0491,13.5501,92.7102);
          return 1;
     }
     public OnPlayerEnterCheckpoint(playerid);
     {
          GivePlayerMoney(playerid, 5000);
          DisablePlayerCheckpoint(playerid);
          SendClientMessage(playerid,0xFFFF00AA, "You Have Earned $5000 For Exporting The Car!");
          return 1;
     }
error:
Код:
C:\Documents and Settings\Owner\Desktop\Samp Stuff 2\my scripting\The Server\filterscripts\dropcar.pwn(94) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Owner\Desktop\Samp Stuff 2\my scripting\The Server\filterscripts\dropcar.pwn(97) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Owner\Desktop\Samp Stuff 2\my scripting\The Server\filterscripts\dropcar.pwn(104) : warning 225: unreachable code
C:\Documents and Settings\Owner\Desktop\Samp Stuff 2\my scripting\The Server\filterscripts\dropcar.pwn(104) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: my own /dropcar - Armando B - 02.08.2012

anyone?


Re: my own /dropcar - [MM]RoXoR[FS] - 02.08.2012

SetPlayerCheckpoint is wrong. I think you gave it angle parameter as well

pawn Код:
SetPlayerCheckpoint(playerid, 115,2699.4993,-2226.0491,10);
For any loose indentation add
pawn Код:
#pragma tabsize 0
at top of your code.

Also, make sure that /dropoff code is inside OnPlayerCoommandText
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/dropcar", true) == 0)
    {
          SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}SERVER: Drop The Car Off At The Checkpoint!");
          SetPlayerCheckpoint(playerid, 115,2699.4993,-2226.0491,10);
          return 1;
    }
    return 0;
}