SA-MP Forums Archive
10 Error`s Can Somebody Help Me? - 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: 10 Error`s Can Somebody Help Me? (/showthread.php?tid=424242)



10 Error`s Can Somebody Help Me? - oscar7610 - 21.03.2013

Код:
D:\Downloads\GAMES\GTA San Andreas\SCRIPT SERVER\Gangwarz\pawno\include\func.inc(263) : error 025: function heading differs from prototype
D:\Downloads\GAMES\GTA San Andreas\SCRIPT SERVER\Gangwarz\pawno\include\func.inc(264) : error 021: symbol already defined: "SetPlayerMoney"
D:\Downloads\GAMES\GTA San Andreas\SCRIPT SERVER\Gangwarz\gamemodes\EGW.pwn(46) : error 021: symbol already defined: "Time"
D:\Downloads\GAMES\GTA San Andreas\SCRIPT SERVER\Gangwarz\gamemodes\EGW.pwn(239) : error 076: syntax error in the expression, or invalid function call
D:\Downloads\GAMES\GTA San Andreas\SCRIPT SERVER\Gangwarz\gamemodes\EGW.pwn(240) : error 076: syntax error in the expression, or invalid function call
D:\Downloads\GAMES\GTA San Andreas\SCRIPT SERVER\Gangwarz\gamemodes\EGW.pwn(241) : error 076: syntax error in the expression, or invalid function call
D:\Downloads\GAMES\GTA San Andreas\SCRIPT SERVER\Gangwarz\gamemodes\EGW.pwn(242) : error 076: syntax error in the expression, or invalid function call
D:\Downloads\GAMES\GTA San Andreas\SCRIPT SERVER\Gangwarz\gamemodes\EGW.pwn(780) : error 076: syntax error in the expression, or invalid function call
D:\Downloads\GAMES\GTA San Andreas\SCRIPT SERVER\Gangwarz\gamemodes\EGW.pwn(788) : error 076: syntax error in the expression, or invalid function call
D:\Downloads\GAMES\GTA San Andreas\SCRIPT SERVER\Gangwarz\gamemodes\EGW.pwn(2499) : error 076: syntax error in the expression, or invalid function call
D:\Downloads\GAMES\GTA San Andreas\SCRIPT SERVER\Gangwarz\gamemodes\EGW.pwn(2526) : warning 203: symbol is never used: "ret_memcpy"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


10 Errors.
SKYPE: OscarTheGeneral Please Add me.


Re: 10 Error`s Can Somebody Help Me? - Misiur - 21.03.2013

Show your func.inc lines 258-268,
EGW.pwn lines 42-48, and all other lines with errors


Re: 10 Error`s Can Somebody Help Me? - oscar7610 - 21.03.2013

Код:
/*----------------------------------------------------------------------------*-
Function:
	SetPlayerMoney
Parameters:
	playerid - the player who receive the money.
	money - money to set.
Action:
	- Sets a player money.
-*----------------------------------------------------------------------------*/
stock SetPlayerMoney(playerid, money)
{
	ResetPlayerMoney( playerid );
	GivePlayerMoney( playerid, money );
	return true;
}
/*----------------------------------------------------------------------------*-
Function:
	SetAllMoney
Parameters:
	money - money to set.
Action:
	- Sets all players money.
-*----------------------------------------------------------------------------*/
stock SetAllMoney(money)
{
	foreach(Player, i)
	{
		ResetPlayerMoney( i );
		GivePlayerMoney( i, money );
	}
	return true;
}
/*------------------------------------------------------------------
This Compiles Without Errors.

Код:
new bool:Commands[MAX_PLAYERS];
new Text:servertitle;
new Text:serverby;
//////////////////////////////////
new gTeam[MAX_PLAYERS];
new Text:version;
new Text:Time, Text:Date;
forward settime(playerid);
forward serverhelp(playerid);
//////////////////////////////////
#define ITALIAN_MAFIA 0
#define RUSSIAN_MAFIA 1
#define HITMANS 2
#define BIKER 3
#define ELITEG 4
#define MARASALVA 5
Can I give you Team Viewr Please man?


Re: 10 Error`s Can Somebody Help Me? - Misiur - 21.03.2013

Nope, helping only via forums. Show other lines with errors. For those: Text:Time - there is already global variable with name Time, rename this or rename the second one.

Quote:

symbol already defined: "SetPlayerMoney"

You have 2 functions with name SetPlayerMoney - one is stock, the other one is public (differs from prototype error suggests this). Choose which one you want to leave, remove the other one.


Re: 10 Error`s Can Somebody Help Me? - oscar7610 - 21.03.2013

I never had this problem before I don`t know what to do seriously.


Re: 10 Error`s Can Somebody Help Me? - Misiur - 21.03.2013

Wait, so it was compiling fine, you added some code and then those errors popped up? In that case you might have some syntax error in the new code which makes compiler go crazy. Show lines 230-250


Re: 10 Error`s Can Somebody Help Me? - oscar7610 - 21.03.2013

Код:
public OnGameModeInit()
{
    SetTimer("serverhelp", 1800000, 1);
  	DisableInteriorEnterExits();
	EnableStuntBonusForAll(0);
	SetNameTagDrawDistance(10.0);
	SetGameModeText("Elite Gang Wars");
	EnableZoneNames(1);
	DisableNameTagLOS();
 	version = TextDrawCreate(562,435,"EGW V1.4");
 	TextDrawColor(version , 0xFA0505FF);
 	TextDrawSetShadow(version, 0);
 	TextDrawSetOutline(version , true);
 	TextDrawFont(version , 3);
  	SetTimer("settime",1000,true);
	Date = TextDrawCreate(547.000000,22.000000,"--");
	TextDrawColor(Date , 0xFA0505FF);
	TextDrawFont(Date,1);
	TextDrawLetterSize(Date,0.399999,1.600000);
	Time = TextDrawCreate(547.000000,37.000000,"--");
	TextDrawColor(Time , 0xFA0505FF);
	TextDrawFont(Time,1);
	TextDrawLetterSize(Time,0.399999,1.600000);
	SetTimer("settime",1000,true);
	servertitle = TextDrawCreate(150 ,335 , "Elite Gangwars v1.4");
	TextDrawFont(servertitle , 3);
	TextDrawLetterSize(servertitle , 1.1, 4.5);
	TextDrawColor(servertitle , 0xFA0505FF);
	TextDrawSetOutline(servertitle , true);
	TextDrawSetProportional(servertitle , true);
	TextDrawSetShadow(servertitle , 1);
	serverby = TextDrawCreate(7 ,426 , "Script by Oscar Sammut");
	TextDrawFont(serverby , 3);
	TextDrawLetterSize(serverby , 0.28, 2);
	TextDrawColor(serverby , 0xFA0505FF);
	TextDrawSetOutline(serverby , true);
	TextDrawSetProportional(serverby , true);
	TextDrawSetShadow(serverby , 1);



Re: 10 Error`s Can Somebody Help Me? - Misiur - 21.03.2013

Well, this is weird, as it points to textdraw functions (if the lines are correct). Search for SetPlayerMoney and show whatever you find (there should be 2 hits, one public SetPlayerMoney and other stock SetPlayerMoney)