SA-MP Forums Archive
Gate Script issues,help please - 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: Gate Script issues,help please (/showthread.php?tid=283902)



Gate Script issues,help please - jotan. - 17.09.2011

I get following errors in script (gamemode) :
Код:
E:\bestgamemode.pwn(38) : error 017: undefined symbol "Gate"
E:\bestgamemode.pwn(38) : warning 215: expression has no effect
E:\bestgamemode.pwn(38) : error 001: expected token: ";", but found "]"
E:\bestgamemode.pwn(38) : error 029: invalid expression, assumed zero
E:\bestgamemode.pwn(38) : fatal error 107: too many error messages on one line
this is some first lines
Код:
#include <a_samp>
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_RED 0xFF0000AA
#define COLOR_GREEN 0x00FF00AA
#define COLOR_BLUE 0x0000FFAA
#define COLOR_GRAY 0xAFAFAFAA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_LIGHTBLUE 0x0AFFFFAA
#define COLOR_PURPLE 0xFF00FFAA
#define COLOR_ORANGE 0xFFBB00AA
#if defined FILTERSCRIPT
new Gate[2],
    bool:Open[3 char];
new Gate1,Gate2
    bool:Open1,bool:Open2;
main()
{
	print("\n----------------------------------");
	print(" Gamemode by iPwN");
	print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
	UsePlayerPedAnims();
	{
	{
    Gate[0] = CreateObject(980,3097.79296875,-1450.046875,68.65291595459,0,0,90,Float:DrawDistance = 5.0);
    Gate[1] = CreateObject(980,2803.6767578125,-1450.3671875,68.637771606445,0,0,90,Float:DrawDistance = 5.0);
    return 1;
}



Re: Gate Script issues,help please - [MWR]Blood - 17.09.2011

pawn Код:
#if defined FILTERSCRIPT
new Gate[2],
    bool:Open[3 char];
new Gate1,Gate2
    bool:Open1,bool:Open2;
Should be
pawn Код:
new Gate[2],
    bool:Open[3 char];
new Gate1,Gate2
    bool:Open1,bool:Open2;
#if defined FILTERSCRIPT
Put them before checking the defines!


Re: Gate Script issues,help please - cessil - 17.09.2011

your brackets are messed up


Re: Gate Script issues,help please - [MWR]Blood - 17.09.2011

Quote:
Originally Posted by cessil
Посмотреть сообщение
your brackets are messed up
Yeah, that too -
pawn Код:
public OnGameModeInit()
{
    UsePlayerPedAnims();
    Gate[0] = CreateObject(980,3097.79296875,-1450.046875,68.65291595459,0,0,90,Float:DrawDistance = 5.0);
    Gate[1] = CreateObject(980,2803.6767578125,-1450.3671875,68.637771606445,0,0,90,Float:DrawDistance = 5.0);
    return 1;
}



Re: Gate Script issues,help please - jotan. - 17.09.2011

Now its:
Код:
E:\bestgamemode.pwn(22) : error 001: expected token: ";", but found "-label-"
E:\bestgamemode.pwn(36) : error 017: undefined symbol "DrawDistance"
E:\bestgamemode.pwn(36) : warning 215: expression has no effect
E:\bestgamemode.pwn(36) : error 001: expected token: ";", but found ")"
E:\bestgamemode.pwn(36) : error 029: invalid expression, assumed zero
E:\bestgamemode.pwn(36) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.



Re: Gate Script issues,help please - [MWR]Blood - 17.09.2011

pawn Код:
public OnGameModeInit()
{
    UsePlayerPedAnims();
    Gate[0] = CreateObject(980,3097.79296875,-1450.046875,68.65291595459,0,0,90,5.0);
    Gate[1] = CreateObject(980,2803.6767578125,-1450.3671875,68.637771606445,0,0,90,5.0);
    return 1;
}



Re: Gate Script issues,help please - System64 - 17.09.2011

We can't do anything without lines...


Re: Gate Script issues,help please - [MWR]Blood - 17.09.2011

Quote:
Originally Posted by System64
Посмотреть сообщение
We can't do anything without lines...
The code is included in the first post - look better.
By showing the 5 errors he is facing, he means my code, in which I missed something, that has been fixed now.


Re: Gate Script issues,help please - System64 - 17.09.2011

Quote:
Originally Posted by [MWR]Blood
Посмотреть сообщение
The code is included in the first post - look better.
By showing the 5 errors he is facing, he means my code, in which I missed something, that has been fixed now.
ma' bad...