Little help...
#5

Quote:
Originally Posted by OmeRinG
Show us the current code and how you declared the variables on top
I did like this first, Putted the new Float:Z[MAX_PLAYERS]; on the top of the GM, gave me 4 wanrings, no function in-game so I tried to put it as before like this:

Код:
if (strcmp("/s", cmdtext, true, 10) == 0)
{
new Float:Z[MAX_PLAYERS];
GetVehicleZAngle(playerid,Z[playerid]);
GetPlayerPos(playerid, ppx[playerid], ppy[playerid], ppz[playerid]);
SendClientMessage (playerid, COLOR_YELLOW, "Position Saved!");
 return 1;
}
if (strcmp("/l", cmdtext, true, 10) == 0)
{
new Float:Z[MAX_PLAYERS];
if(IsPlayerInAnyVehicle(playerid))
{
SetVehicleZAngle(playerid,Z[playerid]);
SetVehiclePos(GetPlayerVehicleID(playerid), ppx[playerid], ppy[playerid], ppz[playerid]);
}
else
{
SetPlayerPos(playerid, ppx[playerid], ppy[playerid], ppz[playerid]);
}
SendClientMessage (playerid, COLOR_YELLOW, "You have been teleported.");
return 1;
}
no errors or warnings but still no function in-game.

Then I switched to this:

Код:
if (strcmp("/s", cmdtext, true, 10) == 0)
new Float:Z[MAX_PLAYERS];
{
GetVehicleZAngle(playerid,Z[playerid]);...
Код:
if (strcmp("/l", cmdtext, true, 10) == 0)
new Float:Z[MAX_PLAYERS];
{
if(IsPlayerInAnyVehicle(playerid))...
that gave me this result after compiling:
Код:
C:\Program\ROCKST~1\GTASAN~1\samp\GAMEMO~1\SeRVeR.pwn(1017) : error 003: declaration of a local variable must appear in a compound block
C:\Program\ROCKST~1\GTASAN~1\samp\GAMEMO~1\SeRVeR.pwn(1017) : warning 221: label name "Float" shadows tag name
C:\Program\ROCKST~1\GTASAN~1\samp\GAMEMO~1\SeRVeR.pwn(1017) : error 017: undefined symbol "Z"
C:\Program\ROCKST~1\GTASAN~1\samp\GAMEMO~1\SeRVeR.pwn(1017) : warning 215: expression has no effect
C:\Program\ROCKST~1\GTASAN~1\samp\GAMEMO~1\SeRVeR.pwn(1017) : error 001: expected token: ";", but found "]"
C:\Program\ROCKST~1\GTASAN~1\samp\GAMEMO~1\SeRVeR.pwn(1017) : fatal error 107: too many error messages on one line

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


4 Errors.
Sry, but im a very shitty scripter, very new, started for about a week ago and I got the script from the net.
Reply


Messages In This Thread
Little help... - by Dr4cK - 24.04.2009, 20:28
Re: Little help... - by Joe Staff - 24.04.2009, 20:32
Re: Little help... - by Dr4cK - 24.04.2009, 20:53
Re: Little help... - by OmeRinG - 24.04.2009, 21:59
Re: Little help... - by Dr4cK - 24.04.2009, 22:13

Forum Jump:


Users browsing this thread: 1 Guest(s)