[HELP]Error to Compile
#1

Well, today was doing a FilterScript language, for example to speak Italian using / it.But when compiling I get an error that I can not fix it: S
He has had 9 errors of which I managed to fix 8, the last I do not get :S

The error is:

Line (73): error 001: expected token: "# endif", but found "-end of file" "

This is line 72: //----------[ Scripted by R3SpaWn to SD-RP-]--------------||[ www.sd rp.com ] | |
This is line 73:


I hope someone help me :S
Thank you very much.
Reply
#2

You probably have a #ifdefined near the beginning of your script,
so you need to end that.

Can you post the beginning of your script.
Reply
#3

//|-----------------------------------------|
//| Copyright ©R3SpaWn |
//| No cambiar creditos. |
//| Gracias. |
//|-----------------------------------------|
// Este filescript sirve para que un jugador hable en distintos idiomas.
// Italiano,Japonиs,Chino,Mexicano,etc..
//Script realizado para SD-RP [www.sd-rp.com

#include <a_samp>
#define FILTERSCRIPT
#define print
#if defined FILTERSCRIPT
#if defined print

Is this,but is in spanish ^^ I am Spanish and I'm doing this in Spanish
Reply
#4

you need to look to see whats your last #if is, and make sure it has a corresponding #endif
Reply
#5

Look,this is the FS

http://sa-mp.es/foro/pastebin/index.php?post=55

I'v uploaded this in pastebin

You can find the bug?
Reply
#6

I don't have access to that forum can you put hte pastebin link up.
Reply
#7

Код:
//|-----------------------------------------|
//|   Copyright ©R3SpaWn            |
//|   No cambiar creditos.             |
//|           Gracias.             |
//|-----------------------------------------|
// Este filescript sirve para que un jugador hable en distintos idiomas.
// Italiano,Japonиs,Chino,Mexicano,etc..
//Script realizado para SD-RP [www.sd-rp.com

#include <a_samp>
#define FILTERSCRIPT
#define print
#if defined FILTERSCRIPT
#if defined print

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Filterscript lenguajes por R3SpaWn");
	print("--------------------------------------\n");
	return 1;
}



public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print(" Filterscript lenguajes por R3SpaWn ");
  print(" No copiar creditos. ");
	print("----------------------------------\n");
	return 1;

}

#endif

//-----------------[ITALIANO]---------------
 	if(strcmp(cmd, "/it", true) == 0);
	{
	  if(IsPlayerConnected(playerid))
	  {
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[128];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_WHITE, "[Uso:] /ita [Texto]");
				return 1;
			}
			format(string, sizeof(string), "[ITA] %s dice: %s", GetPlayerNameEx(playerid), result);
			ProxDetector(5.0, playerid, string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE);
		}
		return 1;
	}

//----------[Scripteado por R3SpaWn para SD-RP]--------------||[www.sd-rp.com]||
Now?
Reply
#8

Ok, yep as i expected, you need to end the #if defined FILTERSCRIPT

put #endif at the end of your script
Reply
#9

Hey thanks! It worked! Thank you very much friend!
Reply
#10

np
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)