28.10.2010, 08:12
PAWN CODE:
After Compile It i get:
Guys Chek out whats the problem,n please help me..
Код:
// TEST SCRIPT by Dr.Ghost
// use commands /dc ammount
//#define FILTERSCRIPT
#include <a_samp>
#define FILTERSCRIPT
#include <sscanf>// credits by ******
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#define MSGFAIL_COLOR 0xff55aaff
#define MSGCOMM_COLOR 0x55aaff77
//Pickup IDs used
#define MoneyPack 1212
#define MoneyBag 1550
const PickupsMax=120;
new Pickups=0;
new PUMoney[PickupsMax];
new PUAmount[PickupsMax];
public OnFilterScriptInit()
{
Pickups=0;
return 1;
}
public OnFilterScriptExit()
{
for (new p=1;p<PickupsMax;p++)
{
DestroyPickup(PUMoney[p]);
}
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" By Mafia_2010");
print("----------------------------------\n");
}
#endif
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("DEATCH MATCH v1.0(BETA)");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
return 1;
}
forward OnPlayerDeath(playerid);
public OnPlayerDeath(playerid)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
new Amount=GetPlayerMoney(playerid)/10;
if(Amount>0)
{
DropPickupMoney(playerid,Amount);
}
return 1;
}
forward DropPickupMoney(playerid,Amount);
public DropPickupMoney(playerid,Amount)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
Pickups++;
PUAmount[Pickups]=Amount;
GivePlayerMoney(playerid,-Amount);
if(Amount<150000)
{
PUMoney[Pickups]=CreatePickup(MoneyPack,3,X+2,Y+2,Z,-1);
}
else
{
PUMoney[Pickups]=CreatePickup(MoneyBag,3,X+2,Y+2,Z,-1);
}
new string[48];
format(string,sizeof(string),"~r~~h~you dropped~n~~y~$ ~g~~h~%d",Amount);
GameTextForPlayer(playerid,string,2000,5);
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(DC, 2, cmdtext);
return 0;
}
dcmd_DC(playerid,cmdtext[])
{
new Amount;
if (sscanf(cmdtext,"d",Amount))
{
SendClientMessage(playerid,MSGCOMM_COLOR, "Usage: \"/DC <Amount>\"");
}
else
{
if(GetPlayerMoney(playerid)<Amount)
{
return SendClientMessage(playerid,MSGFAIL_COLOR,"You dont have that much money!");
}
if(Amount>0)
{
DropPickupMoney(playerid,Amount);
}
else
{
SendClientMessage(playerid,MSGFAIL_COLOR,"You cant drop negative money!");
}
}
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
forward OnPlayerPickUpPickup(playerid,pickupid);
public OnPlayerPickUpPickup(playerid,pickupid)
{
for (new p=0;p<PickupsMax;p++)
{
if (pickupid==PUMoney[p] && PUAmount[p]>0)
{
new string[64];
format(string,sizeof(string),"~w~you found~n~~y~$ ~g~~h~%d",PUAmount[p]);
GameTextForPlayer(playerid,string,4000,5);
GivePlayerMoney(playerid,PUAmount[p]);
DestroyPickup(PUMoney[p]);
}
}
return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}
public OnPlayerUpdate(playerid)
{
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
Quote:
|
C:\Documents and Settings\user\Desktop\Freeroam\pawno\DEATCHMATCH.p wn(40) : error 026: no matching "#if..." C:\Documents and Settings\user\Desktop\Freeroam\pawno\DEATCHMATCH.p wn(49) : error 026: no matching "#if..." C:\Documents and Settings\user\Desktop\Freeroam\pawno\DEATCHMATCH.p wn(92) : warning 219: local variable "Amount" shadows a variable at a preceding level C:\Documents and Settings\user\Desktop\Freeroam\pawno\DEATCHMATCH.p wn(101) : warning 219: local variable "Amount" shadows a variable at a preceding level C:\Documents and Settings\user\Desktop\Freeroam\pawno\DEATCHMATCH.p wn(139) : error 025: function heading differs from prototype C:\Documents and Settings\user\Desktop\Freeroam\pawno\DEATCHMATCH.p wn(139) : error 029: invalid expression, assumed zero C:\Documents and Settings\user\Desktop\Freeroam\pawno\DEATCHMATCH.p wn(141) : error 010: invalid function or declaration C:\Documents and Settings\user\Desktop\Freeroam\pawno\DEATCHMATCH.p wn(142) : error 010: invalid function or declaration C:\Documents and Settings\user\Desktop\Freeroam\pawno\DEATCHMATCH.p wn(145) : error 001: expected token: ")", but found "&" C:\Documents and Settings\user\Desktop\Freeroam\pawno\DEATCHMATCH.p wn(145) : error 010: invalid function or declaration C:\Documents and Settings\user\Desktop\Freeroam\pawno\DEATCHMATCH.p wn(145 -- 14 : error 010: invalid function or declarationC:\Documents and Settings\user\Desktop\Freeroam\pawno\DEATCHMATCH.p wn(145 -- 14 : fatal error 107: too many error messages on one lineCompilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 10 Errors. |


: error 010: invalid function or declaration
.
