how do i fix?
#1

Код:
C:\DOCUME~1\Ben\BUREAU~1\GTASCR~1\NORMAA~1.PWN(1091) : warning 235: public function lacks forward declaration (symbol "PirateShipScoreUpdate")
C:\DOCUME~1\Ben\BUREAU~1\GTASCR~1\NORMAA~1.PWN(1104) : warning 235: public function lacks forward declaration (symbol "PayPlayerInArea")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
ty
Reply
#2

Quote:
Originally Posted by blastervirus
Код:
C:\DOCUME~1\Ben\BUREAU~1\GTASCR~1\NORMAA~1.PWN(1091) : warning 235: public function lacks forward declaration (symbol "PirateShipScoreUpdate")
C:\DOCUME~1\Ben\BUREAU~1\GTASCR~1\NORMAA~1.PWN(1104) : warning 235: public function lacks forward declaration (symbol "PayPlayerInArea")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
ty
pawn Код:
forward PirateShipScoreUpdate()
forward PayPlayerInArea)
Put it at top of the script.
Reply
#3

still got same errors

here is pastebin: http://pastebin.com/fd6eebac

i hope this will help you further
Reply
#4

just a little note, its
pawn Код:
forward PayPlayerInArea();
forward PirateShipScoreUpdate();
also, i would really suggest you to use a macro for these things, way easier

pawn Код:
#define fpublic%1(%2) forward %1(%2); public %1(%2)
and then, when making a public function, you will use:
pawn Код:
fpublic Function(params)
instead of
pawn Код:
forward Function(params)
public Function(params)
EDIT: You forgot the semicolons, try my way, it will help you :P

EDIT 2: here the pastebin, so you see a example
http://pastebin.com/d67e5175d


Cheers.
Reply
#5

but what i want still doesn't works
(givemoney on LV pirate ship)
Reply
#6

Woh Extremo that's genious
Maybe I'll use that too, spares me a lot of lines too xD

EDIT: Does that fpublic thing also works for Floats?
So for:

forward Float:GetDistanceBetweenPlayers(p1,p2); for example?
Reply
#7

It should work fine Hypar. Btw that wasn't genious, that was just thinking like a lazy programmer lol. And blastervirus, what doesnt work? Could you describe it a bit more please?
Reply
#8

lol its marvellous how easy it is to impress "not so good" scritpers with macros XD (no offense)

@Blastervirus

You never called the public PirateShipScoreUpdate so it couldnt work
Now here again the same (copied from Extremo's posted pastebin link)
Just with the Timer at OnGameModeInit which calls each second PirateShipScoreUpdate

pawn Код:
#define fpublic%1(%2) forward%1(%2); public%1(%2)
pawn Код:
//OnGameModeInit
SetTimer(#PirateShipScoreUpdate, 1000, true);
pawn Код:
fpublic PirateShipScoreUpdate()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        PayPlayerInArea(i, 1995.5, 1518.0, 2006.0, 1569.0, 200);
        PayPlayerInArea(i, 1516.1332, -1380.5281, 1568.4066, -1336.3019, 200);
        PayPlayerInArea(i, -1988.4744, 639.1348, -1917.0579, 715.5820, 200);
    }
}
pawn Код:
fpublic PayPlayerInArea(playerID, Float:x1, Float:y1, Float:x2, Float:y2, cash)
{
    if(IsPlayerConnected(playerID))
    {
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerID, X, Y, Z);
        if(X >= x1 && X <= x2 && Y >= y1 && Y <= y2)
            return GivePlayerMoney(playerID, cash);
    }
    return false;
}
Reply
#9

♣ ⓐⓢⓢ, I already helped him on MSN, everything works fine now.

And Extremo, you're still a genious xD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)