Compilation 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: Compilation error (
/showthread.php?tid=318073)
Compilation error -
viddo - 13.02.2012
When i try to compile this script
Код HTML:
#include <a_samp>
new airportgate1;
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
airportgate1 = CreateObject(980, 1638.0999755859, -1141.1999511719, 25.700000762939, 0, 0, 358);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp("/close", cmdtext))
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 1638.0107, -1143.5377, 23.9063))
{
MoveObject(airportgate1, 1638.0999755859, -1141.1999511719, 25.700000762939, 10.0);
SendClientMessage(playerid, 0xEF994300, "You clicked on the remote and opened the impound gate.");
}
return 1;
}
if (!strcmp("/open", cmdtext))
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 1638.0107, -1143.5377, 23.9063))
{
MoveObject(airportgate1, 1638.4312,-1141.1145,45.6475, 10.0);
SendClientMessage(playerid, 0xEF994300, "You clicked on the remote and closed the impound gate.");
}
return 1;
}
#endif
I get this error :
Код:
C:\Users\Viddo\Desktop\LARP 4.0\LARP 4.0 D\gamemodes\Untitled.pwn(54) : error 030: compound statement not closed at the end of file (started at line 34)
Re: Compilation error -
PawnFox - 13.02.2012
Код:
#include <a_samp>
new airportgate1;
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
airportgate1 = CreateObject(980, 1638.0999755859, -1141.1999511719, 25.700000762939, 0, 0, 358);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp("/close", cmdtext))
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 1638.0107, -1143.5377, 23.9063))
{
MoveObject(airportgate1, 1638.0999755859, -1141.1999511719, 25.700000762939, 10.0);
SendClientMessage(playerid, 0xEF994300, "You clicked on the remote and opened the impound gate.");
}
return 1;
}
if (!strcmp("/open", cmdtext))
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 1638.0107, -1143.5377, 23.9063))
{
MoveObject(airportgate1, 1638.4312,-1141.1145,45.6475, 10.0);
SendClientMessage(playerid, 0xEF994300, "You clicked on the remote and closed the impound gate.");
}
return 1;
}
return 0;
}
#endif