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



Wierd error? - Bashur - 04.03.2014

error 029: invalid expression, assumed zero
error 010: invalid function or declaration

I keep getting these errors anyone can fix these?

here's my code
Код:
//Random Messages
new RandomMSG[][] =
{
    "We are hiring faction leaders, you can make application on our webiste-lasventuras-roleplay.com",
    "We are hiring helpers, you can make application on our webiste-www.lasventuras-roleplay.com",
    "The first one who levels up to level 10 and is a good roleplayer will get Family/Faction leadership !",
   {
	return 1;
};



Re: Wierd error? - [XST]O_x - 04.03.2014

What the hell does this "return" do there?

pawn Код:
new RandomMSG[][] =
{
    "We are hiring faction leaders, you can make application on our webiste-lasventuras-roleplay.com",
    "We are hiring helpers, you can make application on our webiste-www.lasventuras-roleplay.com",
    "The first one who levels up to level 10 and is a good roleplayer will get Family/Faction leadership !",
};



Re: Wierd error? - Bashur - 04.03.2014

I tought it would fix it but it didn't
But now i get these errors:
error 029: invalid expression, assumed zero
error 008: must be a constant expression; assumed zero


Re: Wierd error? - Konstantinos - 04.03.2014

Post the exact line and 10 lines before and after.


Re: Wierd error? - Bashur - 04.03.2014

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Post the exact line and 10 lines before and after.
Код:
#define TEXT_DRAW_Y_FACTOR  	(0.8) // Font size Y factor (DEFAULT: 0.8) (RECOMENDED NOT TO CHANGE)
//
new sexprice;
new bizprice;
new houseprice;
new carprice;
new carslot;
new objveh[MAX_VEHICLES][9], bool:opendoor[MAX_VEHICLES];
new walktime[MAX_PLAYERS];
//Random Messages
new RandomMSG[][] =
{
    "We are hiring faction leaders, you can make application on our webiste-lasventuras-roleplay.com",
    "We are hiring helpers, you can make application on our webiste-www.lasventuras-roleplay.com",
    "The first one who levels up to level 10 and is a good roleplayer will get Family/Faction leadership !",
};
//===NEW'S====TAXI JOB//
new Text:taxithisfare[MAX_PLAYERS];
new IsOnFare[MAX_PLAYERS];
new OnDuty[MAX_PLAYERS];
new faretimer[MAX_PLAYERS];

new Float:OldX[MAX_PLAYERS],Float:OldY[MAX_PLAYERS],Float:OldZ[MAX_PLAYERS],Float:NewX[MAX_PLAYERS],Float:NewY[MAX_PLAYERS],Float:NewZ[MAX_PLAYERS];
new Float:TotalFare[MAX_PLAYERS];
// 911
new Call911[MAX_PLAYERS];
I got this


Re: Wierd error? - Konstantinos - 04.03.2014

And the line that was given those 2 errors was?

By the way, you don't need "," at the last message:
pawn Код:
new RandomMSG[][] =
{
    "We are hiring faction leaders, you can make application on our webiste-lasventuras-roleplay.com",
    "We are hiring helpers, you can make application on our webiste-www.lasventuras-roleplay.com",
    "The first one who levels up to level 10 and is a good roleplayer will get Family/Faction leadership !"
};



Re: Wierd error? - Bashur - 04.03.2014

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
And the line that was given those 2 errors was?

By the way, you don't need "," at the last message:
pawn Код:
new RandomMSG[][] =
{
    "We are hiring faction leaders, you can make application on our webiste-lasventuras-roleplay.com",
    "We are hiring helpers, you can make application on our webiste-www.lasventuras-roleplay.com",
    "The first one who levels up to level 10 and is a good roleplayer will get Family/Faction leadership !"
};
You fixed it xD, it works again
+rep