undefined symbol "GetVehicle2DZone"
#1

So.. I've been learning pwn for quite a while, I went ahead tried to make my own script whilst using the help of other scripts as well. I came the script and this error keeps popping
Код:
\pawno\include\YSI\..\YSI_Storage\..\YSI_Coding\y_inline/impl.inc(209) : warning 219: local variable "spec" shadows a variable at a preceding level
\pawno\include\YSI\..\YSI_Storage\..\YSI_Coding\y_inline/impl.inc(265) : warning 219: local variable "spec" shadows a variable at a preceding level
\pawno\include\YSI\..\YSI_Storage\..\YSI_Coding\y_inline/impl.inc(412) : warning 219: local variable "spec" shadows a variable at a preceding level
\pawno\include\YSI\..\YSI_Storage\..\YSI_Coding\y_inline/impl.inc(1380) : warning 219: local variable "spec" shadows a variable at a preceding level
\pawno\include\YSI\..\YSI_Storage\..\YSI_Coding\y_inline/impl.inc(1601) : warning 219: local variable "spec" shadows a variable at a preceding level
\pawno\include\YSI\..\YSI_Storage\..\YSI_Coding\y_inline/impl.inc(1630) : warning 219: local variable "spec" shadows a variable at a preceding level
\pawno\include\YSI_Coding\y_timers.inc(1) : error 075: input line too long (after substitutions)
\gamemodes\mybasicscript.pwn(587) : warning 219: local variable "using_deprecated_foreach_syntax" shadows a variable at a preceding level
\gamemodes\mybasicscript.pwn(967) : warning 219: local variable "using_deprecated_foreach_syntax" shadows a variable at a preceding level
\gamemodes\mybasicscript.pwn(2208) : error 017: undefined symbol "GetVehicle2DZone"
\gamemodes\mybasicscript.pwn(2208) : warning 202: number of arguments does not match definition
\gamemodes\mybasicscript.pwn(2228) : error 017: undefined symbol "GetVehicle2DZone"
\gamemodes\mybasicscript.pwn(2228) : warning 202: number of arguments does not match definition
\gamemodes\mybasicscript.pwn(2310) : warning 219: local variable "using_deprecated_foreach_syntax" shadows a variable at a preceding level
\gamemodes\mybasicscript.pwn(2381) : warning 219: local variable "using_deprecated_foreach_syntax" shadows a variable at a preceding level
\gamemodes\mybasicscript.pwn(8167) : warning 219: local variable "using_deprecated_foreach_syntax" shadows a variable at a preceding level
\gamemodes\mybasicscript.pwn(8191) : warning 219: local variable "using_deprecated_foreach_syntax" shadows a variable at a preceding level
\gamemodes\mybasicscript.pwn(8205) : warning 219: local variable "using_deprecated_foreach_syntax" shadows a variable at a preceding level
\gamemodes\mybasicscript.pwn(8219) : warning 219: local variable "using_deprecated_foreach_syntax" shadows a variable at a preceding level
\gamemodes\mybasicscript.pwn(8232) : warning 219: local variable "using_deprecated_foreach_syntax" shadows a variable at a preceding level
\gamemodes\mybasicscript.pwn(8245) : warning 219: local variable "using_deprecated_foreach_syntax" shadows a variable at a preceding level
\gamemodes\mybasicscript.pwn(8258) : warning 219: local variable "using_deprecated_foreach_syntax" shadows a variable at a preceding level
\gamemodes\mybasicscript.pwn(8272) : warning 219: local variable "using_deprecated_foreach_syntax" shadows a variable at a preceding level
\gamemodes\mybasicscript.pwn(8286) : warning 219: local variable "using_deprecated_foreach_syntax" shadows a variable at a preceding level
\gamemodes\mybasicscript.pwn(8328) : warning 219: local variable "using_deprecated_foreach_syntax" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
I'm really tired of trying to figure it out.. I have the latest a_zones and it is included:

Код:
#include <a_samp>
#include <YSI\y_ini>
#include <foreach>
#include <streamer>
#include <ZCMD>
#include <YSI/y_timers>
#include <yom_buttons>
#include <sscanf2>
#include <time>
#include <a_zones>
I've done my ****** research and even been on some russian websites had to translate what they are saying. They said you have to define it.. However, I don't get where to do as if I do it says it's already defined.

Here are the lines:

Код:
CMD:vspawn(playerid, params[])
{
	new choice, vehicle;
	if(sscanf(params, "i", choice)) { SendClientMessage(playerid, -1, "USAGE: /vspawn [1-5]"); return cmd_vlist(playerid, params); }
    new vslot = choice-1, str[164], zone[60];
	if(choice < 1 || choice > 5 ) return SendClientMessage(playerid, -1, "Valid slot numbers are 1-5.");
	if(PlayerInfo[playerid][pVehicle][vslot] == 0) return SendClientMessage(playerid, -1, "You don't have a vehicle in that slot.");
	if(PlayerInfo[playerid][pVehicleSpawned][vslot] == 1) return SendClientMessage(playerid, -1, "You have already spawned this vehicle.");
	vehicle = CreateVehicle(PlayerInfo[playerid][pVehicle][vslot], PlayerInfo[playerid][pVehiclePosX][vslot], PlayerInfo[playerid][pVehiclePosY][vslot], PlayerInfo[playerid][pVehiclePosZ][vslot], PlayerInfo[playerid][pVehicleRot][vslot], PlayerInfo[playerid][pVehicleCol1][vslot],PlayerInfo[playerid][pVehicleCol2][vslot], 0);
	GetVehicle2DZone(vehicle, zone, sizeof(zone));
	format(str, sizeof(str), "You have spawned your vehicle at %s.", zone);
	PlayerInfo[playerid][pVehicleSpawned][vslot] = 1;
	PlayerInfo[playerid][pVehicleSpawnedID][vslot] = vehicle;
	SendClientMessage(playerid, COLOR_GRAD1, str);
	new plate[126];
	format(plate, sizeof(plate), "LS%i", vehicle);
	SetVehicleNumberPlate(vehicle, plate);
	return 1;
}

CMD:vtrack(playerid, params[])
{
	new choice, Float:vx, Float:vy, Float:vz;
	if(sscanf(params, "i", choice)) return SendClientMessage(playerid, -1, "USAGE: /vtrack [1-5]");
    new vslot = choice-1, str[164], zone[60];
    if(CPT[playerid] != 0) return SendClientMessage(playerid, -1, "You can't use this command while you have an active checkpoint, use /destroycheckpoint.");
	if(choice < 1 || choice > 5 ) return SendClientMessage(playerid, -1, "Valid slot numbers are 1-5.");
	if(PlayerInfo[playerid][pVehicle][vslot] == 0) return SendClientMessage(playerid, -1, "You don't have a vehicle in that slot.");
	if(PlayerInfo[playerid][pVehicleSpawned][vslot] == 0) return SendClientMessage(playerid, -1, "You don't have a vehicle spawned in that slot.");
	GetVehicle2DZone(PlayerInfo[playerid][pVehicleSpawnedID][vslot], zone, sizeof(zone));
	GetVehiclePos(PlayerInfo[playerid][pVehicleSpawnedID][vslot], vx, vy, vz);
	SetPlayerCheckpoint(playerid, vx, vy, vz, 10.0);
	format(str, sizeof(str), "Your vehicle is at %s.", zone);
	SendClientMessage(playerid, COLOR_GRAD1, str);
	return 1;
}
Reply
#2

That has happened to me once, It was because I missed any bracket or something like:
Код:
public OnPlayerUpdate(playerid)
{
	switch
	Player[playerid] = GetTickCount();
	return 1;
}
Check your latest changes in the code
Reply
#3

But by the looks of it.. I honestly didn't miss out on anything.
Reply
#4

Try some tool like this: https://sampforum.blast.hk/showthread.php?tid=171429
Reply
#5

Quote:
Originally Posted by adri1
Посмотреть сообщение
Result:
Opening angle brackets ({): 1242
Closing angle brackets (}): 1242
Everything was fine

^ Just did the test. Nothing is wrong.
Reply
#6

Other case:
Код:
public OnPlayerUpdate(playerid)
{
	last = GetTickCount();
	return 1;
}
Код:
C:\Users\pc\Documents\SA-MP\pawn\include\amx_assembly\amx_header.inc(311) : warning 219: local variable "last" shadows a variable at a preceding level
C:\Users\pc\Documents\SA-MP\pawn\include\YSI-Includes\YSI\..\YSI_Coding\..\YSI_Internal\y_version.inc(299) : warning 219: local variable "last" shadows a variable at a preceding level
C:\Users\pc\Documents\SA-MP\pawn\include\YSI-Includes\YSI\..\YSI_Visual\..\YSI_Data\y_foreach/impl.inc(208) : warning 219: local variable "last" shadows a variable at a preceding level
C:\Users\pc\Documents\SA-MP\pawn\include\YSI-Includes\YSI\..\YSI_Visual\..\YSI_Data\y_foreach/impl.inc(322) : warning 219: local variable "last" shadows a variable at a preceding level
C:\Users\pc\Documents\SA-MP\pawn\include\YSI-Includes\YSI\..\YSI_Visual\..\YSI_Data\y_foreach/impl.inc(344) : warning 219: local variable "last" shadows a variable at a preceding level
C:\Users\pc\Documents\SA-MP\pawn\include\YSI-Includes\YSI\..\YSI_Visual\..\YSI_Data\y_foreach/impl.inc(404) : warning 219: local variable "last" shadows a variable at a preceding level
The problem is 'last' is not declared.

Find for 'spec' variables in your scripts
You should make a full revision of your script :/ thats annoying
Reply
#7

Honestly.. I don't understand what you mean.. I was talking about the errors that appear.
Reply
#8

Quote:
Originally Posted by adri1
Посмотреть сообщение
That has happened to me once, It was because I missed any bracket or something like:
Код:
public OnPlayerUpdate(playerid)
{
	switch
	Player[playerid] = GetTickCount();
	return 1;
}
Check your latest changes in the code
Quote:
Originally Posted by adri1
Посмотреть сообщение
Quote:
Originally Posted by adri1
Посмотреть сообщение
Other case:
Код:
public OnPlayerUpdate(playerid)
{
	last = GetTickCount();
	return 1;
}
Код:
C:\Users\pc\Documents\SA-MP\pawn\include\amx_assembly\amx_header.inc(311) : warning 219: local variable "last" shadows a variable at a preceding level
C:\Users\pc\Documents\SA-MP\pawn\include\YSI-Includes\YSI\..\YSI_Coding\..\YSI_Internal\y_version.inc(299) : warning 219: local variable "last" shadows a variable at a preceding level
C:\Users\pc\Documents\SA-MP\pawn\include\YSI-Includes\YSI\..\YSI_Visual\..\YSI_Data\y_foreach/impl.inc(208) : warning 219: local variable "last" shadows a variable at a preceding level
C:\Users\pc\Documents\SA-MP\pawn\include\YSI-Includes\YSI\..\YSI_Visual\..\YSI_Data\y_foreach/impl.inc(322) : warning 219: local variable "last" shadows a variable at a preceding level
C:\Users\pc\Documents\SA-MP\pawn\include\YSI-Includes\YSI\..\YSI_Visual\..\YSI_Data\y_foreach/impl.inc(344) : warning 219: local variable "last" shadows a variable at a preceding level
C:\Users\pc\Documents\SA-MP\pawn\include\YSI-Includes\YSI\..\YSI_Visual\..\YSI_Data\y_foreach/impl.inc(404) : warning 219: local variable "last" shadows a variable at a preceding level
The problem is 'last' is not declared.

Find for 'spec' variables in your scripts
You should make a full revision of your script :/ thats annoying
About the "last" part. I've went into the amx file

Код:
stock GetPublicIndexFromName(const name[]) {
	InitStaticAmxHeader();

	new num_publics = GetNumPublics(gHdr);

	//Binary search
	new first = 0;
	new last = num_publics - 1;
	new mid;

	while (first <= last) {
		mid = (first + last) / 2;

		new off = gHdr[AMX_HDR_PUBLICS] - gHdr[AMX_HDR_DAT] + mid * gHdr[AMX_HDR_DEFSIZE];
		new nameofs = ReadAmxMemory(off + 4) - gHdr[AMX_HDR_DAT];

		new diff = NtCompare(nameofs, name);
		if (diff < 0) {
			first = mid + 1;
		} else if (diff > 0) {
			last = mid - 1;
		} else {
			return mid;
		}
Reply
#9

And regarding the too long error:
"pawno\include\YSI_Coding\y_timers.inc(1) : error 075: input line too long (after substitutions)"

Код:
#include "YSI_Internal\y_compilerpass"
#include "YSI_Coding\y_timers"
This is the y_timers file


You can help me from skype: cryptex.00 or discord: Shehab#3137
Reply
#10

Update your pawn compiler https://github.com/Zeex/pawn/releases
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)