Can't complie this
#1

Hey guys I have wasted my 1 hour on how to fix this script (I added a lot thigs at the end so I am confused what I need ))

Код:
#include <a_samp>
#include <dini>
#include <dudb>

#pragma unused ret_memcpy

#define FILTERSCRIPT
#define IsPlayerInArea
#define COLOR_RED 0xAA3333AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_SPAWN 0xFF8C55FF
#define COLOR_LIGHTBLUE 0x6DC5F3FF
#define COLOR_ADMIN 0xFF0000FF
#define COLOR_SAY 0x2986CEFF
#define COLOR_SYSGREY 0xC6BEBDFF
#define COLOR_BLACK 0x000000FF
#define COLOR_JOIN 0x74E80099
#define COLOR_WARN 0xBE615099
#define COLOR_RACE 0x00BBBB99
#define COLOR_KRED 0xFF0000FF

#define MAX_PING 600
#define CASH 1000
#define GRAVITY 0.0075
#define TIME_BOOM 60
#define VEHICLES 212
#define TIGER_DIST 8.0
#define NAME_TAG_DIST 600

#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#define MIN_VEHI_ID		400
#define MAX_VEHI_ID		611
#define VEHI_DIS    5.0
new Text:Textdraw0;
new Text:Textdraw1;
new curPlayerVehM[MAX_PLAYERS]				= {MIN_VEHI_ID, ...}; // Current Player Vehicle ID
new curPlayerVehI[MAX_PLAYERS]				= {-1, ...};
enum CURVEHICLE {
	bool:spawn,
	vmodel,
	vInt
};
new curServerVehP[MAX_VEHICLES][CURVEHICLE];
new PlayerVehI[MAX_PLAYERS];

new gSpectateID[MAX_PLAYERS];
new gSpectateType[MAX_PLAYERS];

new rampid[MAX_PLAYERS] = {-1, ...};

forward RemoveRamp(playerid);
forward Float:GetOptimumRampDistance(playerid);
forward Float:GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance);
forward ScanVehicleHealth();
forward CountDown();
forward Bum(playerid);
forward Pingkick();
forward Guns();
forward Planes();
forward Tele(playerid);
forward CheckTime();
forward PlayerObjectUpdate(playerid);
forward TigerDeath(playerid);

new ramptypes[] = {
	1503, // curvy normal one
	1660, // concrete one with pipes
	1245, // plank of wood against a box
	1631, // water ramp with rocks
	1632, // normal water ramp
	1655, // wide water ramp
};
new playerramptypes[MAX_PLAYERS] = {0, ...};


public OnFilterScriptInit()
{
	SetTimer("ScanVehicleHealth", 99999, 0);
	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	return 1;
}

// ------ fix -----------------------------------------------------------------
dcmd_fix(playerid, params[]) {
	#pragma unused params
	if(IsPlayerInAnyVehicle(playerid)) {
		SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0);
		SendClientMessageLang(playerid, COLOR_ORANGE,"Vehicle fixed.","Pojazd naprawiony.");
	}
	else
	{
		SendClientMessageLang(playerid, COLOR_WARN,"You must be in vehicle!","Musisz byж w pojeџdzie!");
	}
	return 1;
}
dcmd_repair(playerid, params[]) { dcmd_fix(playerid, params); return 1; }
//-----------------------------------------------------------------------------

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	new Float:x;
	new Float:y;
	new Float:z;
	if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 564)
	{
		if(IsKeyJustDown(KEY_FIRE,newkeys,oldkeys))
		{
			if(!IsPlayerInArea(playerid, 2089.4050, -2639.0991, 2145.3472, -2588.6860))
			{
				GetPlayerPos(playerid, x, y, z);
				GetXYInFrontOfPlayer(playerid, x, y, TIGER_DIST);
 				CreateExplosion(x,y,z,11, 0.0);
  			tiger[playerid] = 1;
  				SetTimerEx("TigerDeath", 2000, 0, "d", playerid);
  		}
  	}
  }

  	if(IsKeyJustDown(KEY_SECONDARY_ATTACK,newkeys,oldkeys)){
	  	for(new j = 0; j < MAX_VEHICLES; j++)
  		{
  		switch(GetVehicleModel(j))
			{
				case 564,501,464,441,449:
				{
 					if(GetDistancePlayerToVehicle(playerid,j) <= 3)
 					{
    					PutPlayerInVehicle(playerid, j, 0);
					}
				}
			}
		}
	}

	if(IsKeyJustDown(KEY_ACTION,newkeys,oldkeys) && IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	{
		if (rampid[playerid] == -1)
		{
		  new Float:angle;
			GetPlayerPos(playerid, x, y, z);
			angle = GetXYInFrontOfPlayer(playerid, x, y, GetOptimumRampDistance(playerid));
			switch (playerramptypes[playerid])
			{
				case 2:
				{
				  angle -= 90.0;
				  if (angle < 0.0) angle += 360.0;
				  z += 0.5;
				}
				case 1:
				{
				   	z -= 0.5;
				}
  		}
			rampid[playerid] = CreateObject(ramptypes[playerramptypes[playerid]], x, y, z - 0.5, 0.0, 0.0, angle);
			SetTimerEx("RemoveRamp", 2000, 0, "d", playerid);
		}
	}

	if ((newkeys==KEY_ACTION)&&(IsPlayerInAnyVehicle(playerid))&&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER))
	  {
	  if (GetVehicleModel(GetPlayerVehicleID(playerid)) == 525 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 531)
	    {
			new Float:pX,Float:pY,Float:pZ;
			GetPlayerPos(playerid,pX,pY,pZ);
			new Float:vX,Float:vY,Float:vZ;
			new Found=0;
			new vid=0;
			while((vid<MAX_VEHICLES)&&(!Found))
  				{
  				vid++;
  				GetVehiclePos(vid,vX,vY,vZ);
  				if ((floatabs(pX-vX)<7.0)&&(floatabs(pY-vY)<7.0)&&(floatabs(pZ-vZ)<7.0)&&(vid!=GetPlayerVehicleID(playerid)))
  				  {
  				  Found=1;
  				  if	(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
  				    {
  				    DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
  				    }
  				  AttachTrailerToVehicle(vid,GetPlayerVehicleID(playerid));
  				  }
    			}
		  }
	  }

  return 1;
  }

IsKeyJustDown(key, newkeys, oldkeys)
{
	if((newkeys & key) && !(oldkeys & key)) return 1;
	return 0;
}
  dcmd(ramp, 4, cmdtext);
  dcmd(setramp, 7, cmdtext);

// ------ setramp -----------------------------------------------------------------
dcmd_setramp(playerid, cmdtext[]) {
	new tmp[256],idx;
	tmp = strtok(cmdtext, idx);
	new ramp = strval(tmp);
	if(!strlen(tmp))
	{
		SendClientMessageLang(playerid, COLOR_ORANGE,"USAGE: /setramp [0-5]","WPISZ: /setramp [0-5]");
		return 1;
	}
	if (ramp < 0 || ramp >= sizeof(ramptypes)) {
	  SendClientMessageLang(playerid, COLOR_WARN,"Invalid ID.","Zіe ID rampy.");
	} else {
		playerramptypes[playerid] = ramp;
		SendClientMessageLang(playerid, COLOR_ORANGE,"Ramp changed.","Rampa zmieniona.");
	}
	return 1;
}

// ------ ramp -----------------------------------------------------------------
dcmd_ramp(playerid, cmdtext[]) {
	new tmp[256],idx;
 	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp))
	{
	 	SendClientMessageLang(playerid, COLOR_ORANGE,"USAGE: /ramp [on/off]","WPISZ: /ramp [on/off]");
 		return 1;
	}
	if(!strcmp(tmp, "off", true)){
 		playerramptypes[playerid] = -1;
 		SendClientMessageLang(playerid, COLOR_WARN,"* Ramp off!","* Rampa wyі№czona!");
 	}
 	if(!strcmp(tmp, "on", true)){
 		playerramptypes[playerid] = 1;
 		SendClientMessageLang(playerid, COLOR_ORANGE,"* Ramp ON!","* Rampy wі№czone!");
 	}
 	return 1;
}

public RemoveRamp(playerid)
{
	if (rampid[playerid] != -1)
	{
	  DestroyObject(rampid[playerid]);
	  rampid[playerid] = -1;
	}
}

public CheckTime()
{
	minuty++;
	if(minuty == 60){
	  h++;
	  minuty=0;
	}
	if(h == 24){
	  h=0;
	}
	return 1;
}

Float:GetOptimumRampDistance(playerid)
{
	new ping = GetPlayerPing(playerid), Float:dist;
	dist = floatpower(ping, 0.25);
	dist = dist*4.0;
	dist = dist+5.0;
	return dist;
}
I get
Код:
C:\Doc...L.pwn(122) : error 004: function "GetXYInFrontOfPlayer" is not implemented
C:\Doc...L.pwn(124) : error 017: undefined symbol "tiger"
C:\Doc...L.pwn(124) : warning 215: expression has no effect
C:\Doc...L.pwn(124) : error 001: expected token: ";", but found "]"
C:\Doc...L.pwn(124) : error 029: invalid expression, assumed zero
C:\Doc...L.pwn(124) : fatal error 107: too many error messages on one line

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


5 Errors.
how to fix it? please reply
Reply
#2

Please I have time only till 22:00 (GMT +02:00)
Reply
#3

It would be nice if you could show code at 122-124 line.
Reply
#4

Here you go
Код:
				GetXYInFrontOfPlayer(playerid, x, y, TIGER_DIST);
 				CreateExplosion(x,y,z,11, 0.0);
  			tiger[playerid] = 1;
Reply
#5

C:\Doc...L.pwn(122) : error 004: function "GetXYInFrontOfPlayer" is not implemented // that function does not exists?
C:\Doc...L.pwn(124) : error 017: undefined symbol "tiger" // you have to make: new tiger[MAX_PLAYERS];
C:\Doc...L.pwn(124) : warning 215: expression has no effect // will be fixed if the rest is fixed
C:\Doc...L.pwn(124) : error 001: expected token: ";", but found "]" // you forgot a ; at the end of a line
C:\Doc...L.pwn(124) : error 029: invalid expression, assumed zero // don't know, have to see the script
C:\Doc...L.pwn(124) : fatal error 107: too many error messages on one line // will be fixed if the rest is fixed

try to edit it

Reply
#6

Quote:
Originally Posted by dirkblok
C:\Doc...L.pwn(122) : error 004: function "GetXYInFrontOfPlayer" is not implemented // that function does not exists?
C:\Doc...L.pwn(124) : error 017: undefined symbol "tiger" // you have to make: new tiger[MAX_PLAYERS];
C:\Doc...L.pwn(124) : warning 215: expression has no effect // will be fixed if the rest is fixed
C:\Doc...L.pwn(124) : error 001: expected token: ";", but found "]" // you forgot a ; at the end of a line
C:\Doc...L.pwn(124) : error 029: invalid expression, assumed zero // don't know, have to see the script
C:\Doc...L.pwn(124) : fatal error 107: too many error messages on one line // will be fixed if the rest is fixed

try to edit it

"that function does not exists?" How do I make it exist :P
"you forgot a ; at the end of a line" It was added
" don't know, have to see the script" I can put pwn into the rapidshre
"you have to make: new tiger[MAX_PLAYERS];" done but gave me 12 errors posting...
Код:
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(122) : error 004: function "GetXYInFrontOfPlayer" is not implemented
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(137) : error 017: undefined symbol "GetDistancePlayerToVehicle"
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(152) : error 004: function "GetXYInFrontOfPlayer" is not implemented
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(205) : error 010: invalid function or declaration
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(206) : error 010: invalid function or declaration
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(258) : error 017: undefined symbol "minuty"
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(258) : warning 215: expression has no effect
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(259) : error 017: undefined symbol "minuty"
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(260) : error 017: undefined symbol "h"
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(260) : warning 215: expression has no effect
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(261) : error 017: undefined symbol "minuty"
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(261) : warning 215: expression has no effect
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(263) : error 017: undefined symbol "h"
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(264) : error 017: undefined symbol "h"
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(264) : warning 215: expression has no effect
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(295) : error 026: no matching "#if..."
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(296) : warning 203: symbol is never used: "IsInReach"
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(296) : warning 203: symbol is never used: "PlayerVehI"
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(296) : warning 203: symbol is never used: "Textdraw0"
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(296) : warning 203: symbol is never used: "Textdraw1"
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(296) : warning 203: symbol is never used: "curPlayerVehI"
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(296) : warning 203: symbol is never used: "curPlayerVehM"
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(296) : warning 203: symbol is never used: "curServerVehP"
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(296) : warning 203: symbol is never used: "dcmd_fix"
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(296) : warning 203: symbol is never used: "dcmd_ramp"
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(296) : warning 203: symbol is never used: "dcmd_repair"
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(296) : warning 203: symbol is never used: "dcmd_setramp"
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(296) : warning 203: symbol is never used: "gSpectateID"
C:\Documents and Settings\Vitalij.USER-PC\Desktop\Copy of samp 0.3 R3 original\filterscripts\HP+CTRL.pwn(296) : warning 203: symbol is never used: "gSpectateType"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


12 Errors.
Reply
#7

Pastebin : http://pastebin.com/m6aa5d9b8 with 12 errors :P
RESPECT to who is writing
Reply
#8

Quote:
Originally Posted by vitalij931
Pastebin : http://pastebin.com/m6aa5d9b8 with 12 errors :P
RESPECT to who is writing
Not all the code is there, can't fix it without the complete script.
Reply
#9

Quote:
Originally Posted by Veinara
Quote:
Originally Posted by vitalij931
Pastebin : http://pastebin.com/m6aa5d9b8 with 12 errors :P
RESPECT to who is writing
Not all the code is there, can't fix it without the complete script.
Ok than I was trying to get function and objects from Fafu's freeroam GM HERE (Fafu's copyright WILL BE ADDED) That is when pressing CTRL a Ramp appears infront of you for 2-3 sec (with objects I can handle myself)
Then if it's impossible to fix my script could you PLEASE then make... on...e for ... me
Reply
#10

pawn Код:
GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
    new Float:a;
    GetPlayerPos(playerid, x, y, a);
    GetPlayerFacingAngle(playerid, a);
    if (GetPlayerVehicleID(playerid))
    {
      GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
    }
    x += (distance * floatsin(-a, degrees));
    y += (distance * floatcos(-a, degrees));
}
in your script
Reply


Forum Jump:


Users browsing this thread: