SA-MP Forums Archive
Script Error (Help This Noob) [Will +rep] - 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: Script Error (Help This Noob) [Will +rep] (/showthread.php?tid=505738)



Script Error (Help This Noob) [Will +rep] - TDM - 10.04.2014

Hi , lol i really suck at scripting , so i need some help. If your help works i will +rep.

here is the god damn error. I just copied some random messages codes , in my other script BUT when compiling this error came , please help

Код:
C:\Users\xPax\Desktop\New folder\gamemodes\blabla.pwn(124) : error 001: expected token: "}", but found "forward"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: Script Error (Help This Noob) [Will +rep] - JacobEdwards - 10.04.2014

You're simply missing a closing bracket on line 124.


Re: Script Error (Help This Noob) [Will +rep] - Stevolas - 10.04.2014

Well, first off, how about you provide us with the lines that are near the error? This is pretty m uch common sense.

Second, since it said "error 001: expected token: "}", but found "forward"" I would assume that you forgot a bracket to close a function and therefore it noticed you added a forward in the function, giving you the error.

For example, you probably did something like this:

pawn Код:
forward Function1();
public Function1()
{
    //BLABLABLA
    return 1;

forward Function2();
public Function2()
{
    //BLABLABLA
    return 1;
}

//Forgot a function between return 1 and forward function2



Re: Script Error (Help This Noob) [Will +rep] - TDM - 10.04.2014

STEVO :
Код:
forward RandomMessage();
is the line please help


Thank you so much for replies , well i just copied some random messages from a second script and put it in this script but this error came while i was trying to help , and tell me what to show as i said i am a noob in scripting if you help me will be much appreciated!


Re: Script Error (Help This Noob) [Will +rep] - JacobEdwards - 10.04.2014

pawn Код:
forward RandomMessage();
public RandomMessage()
{

}



Re: Script Error (Help This Noob) [Will +rep] - TDM - 10.04.2014

Quote:
Originally Posted by JacobEdwards
Посмотреть сообщение
It would be helpful if I could see the lines surrounding line 124.
learn to read , its already there !!

anyway , here is a better view :


Re: Script Error (Help This Noob) [Will +rep] - JacobEdwards - 10.04.2014

Ahh, just do as I said above.


Re: Script Error (Help This Noob) [Will +rep] - Infinitas - 10.04.2014

Oh just add a } on line 123


Re: Script Error (Help This Noob) [Will +rep] - TDM - 10.04.2014

Quote:
Originally Posted by Infinitas
Посмотреть сообщение
Oh just add a } on line 123
Thanks BUT now i am getting this =_=

Код:
C:\Users\xPax\Desktop\New folder\gamemodes\blabla.pwn(124) : error 001: expected token: ";", but found "forward"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Respuesta: Script Error (Help This Noob) [Will +rep] - Swedky - 10.04.2014

It is necessary to you to close the judgment (;) in the previous code to 'forward'.