SA-MP Forums

Go Back   SA-MP Forums > SA-MP Server > Server Support

Reply
 
Thread Tools Display Modes
Old 28/12/2017, 10:14 AM   #1
Kevy
Little Clucker
 
Join Date: Dec 2017
Posts: 10
Reputation: 0
Default undefined symbol "GetVehicle2DZone"

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
Code:
\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 (c) 1997-2006, ITB CompuPhase
I'm really tired of trying to figure it out.. I have the latest a_zones and it is included:

Code:
#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:

Code:
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;
}
Kevy is offline   Reply With Quote
Old 28/12/2017, 10:18 AM   #2
adri1
Banned
 
Join Date: Oct 2010
Posts: 1,928
Reputation: 955
Default Re: undefined symbol "GetVehicle2DZone"

That has happened to me once, It was because I missed any bracket or something like:
Code:
public OnPlayerUpdate(playerid)
{
	switch
	Player[playerid] = GetTickCount();
	return 1;
}
Check your latest changes in the code
adri1 is offline   Reply With Quote
Old 28/12/2017, 10:20 AM   #3
Kevy
Little Clucker
 
Join Date: Dec 2017
Posts: 10
Reputation: 0
Default Re: undefined symbol "GetVehicle2DZone"

But by the looks of it.. I honestly didn't miss out on anything.
Kevy is offline   Reply With Quote
Old 28/12/2017, 10:25 AM   #4
adri1
Banned
 
Join Date: Oct 2010
Posts: 1,928
Reputation: 955
Default Re: undefined symbol "GetVehicle2DZone"

Try some tool like this: http://forum.sa-mp.com/showthread.php?t=171429
adri1 is offline   Reply With Quote
Old 28/12/2017, 11:03 AM   #5
Kevy
Little Clucker
 
Join Date: Dec 2017
Posts: 10
Reputation: 0
Default Re: undefined symbol "GetVehicle2DZone"

Quote:
Originally Posted by adri1 View Post
Result:
Opening angle brackets ({): 1242
Closing angle brackets (}): 1242
Everything was fine

^ Just did the test. Nothing is wrong.
Kevy is offline   Reply With Quote
Old 28/12/2017, 11:11 AM   #6
adri1
Banned
 
Join Date: Oct 2010
Posts: 1,928
Reputation: 955
Default Re: undefined symbol "GetVehicle2DZone"

Other case:
Code:
public OnPlayerUpdate(playerid)
{
	last = GetTickCount();
	return 1;
}
Code:
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
adri1 is offline   Reply With Quote
Old 28/12/2017, 11:34 AM   #7
Kevy
Little Clucker
 
Join Date: Dec 2017
Posts: 10
Reputation: 0
Default Re: undefined symbol "GetVehicle2DZone"

Honestly.. I don't understand what you mean.. I was talking about the errors that appear.
Kevy is offline   Reply With Quote
Old 28/12/2017, 11:36 AM   #8
Kevy
Little Clucker
 
Join Date: Dec 2017
Posts: 10
Reputation: 0
Default Re: undefined symbol "GetVehicle2DZone"

Quote:
Originally Posted by adri1 View Post
That has happened to me once, It was because I missed any bracket or something like:
Code:
public OnPlayerUpdate(playerid)
{
	switch
	Player[playerid] = GetTickCount();
	return 1;
}
Check your latest changes in the code
Quote:
Originally Posted by adri1 View Post
Quote:
Originally Posted by adri1 View Post
Other case:
Code:
public OnPlayerUpdate(playerid)
{
	last = GetTickCount();
	return 1;
}
Code:
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

Code:
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;
		}
Kevy is offline   Reply With Quote
Old 28/12/2017, 11:38 AM   #9
Kevy
Little Clucker
 
Join Date: Dec 2017
Posts: 10
Reputation: 0
Default Re: undefined symbol "GetVehicle2DZone"

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

Code:
#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
Kevy is offline   Reply With Quote
Old 28/12/2017, 11:54 AM   #10
adri1
Banned
 
Join Date: Oct 2010
Posts: 1,928
Reputation: 955
Default Re: undefined symbol "GetVehicle2DZone"

Update your pawn compiler https://github.com/Zeex/pawn/releases
adri1 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem: undefined symbol "handle_mysql", "strcpy" CoachCarter Scripting Help 5 31/08/2016 12:27 PM
"error 017: undefined symbol "vehicleid"" problem. OMonger Scripting Help 5 31/01/2015 12:55 PM
error 017: undefined symbol "ReadPlayer" and error 017: undefined symbol "WritePlayer" brandypol Scripting Help 8 26/08/2014 06:16 PM
5 Dialog errors - Input line too long, undefined symbol "t","is" and "only" Deal-or-die Scripting Help 6 01/05/2012 12:08 PM


All times are GMT. The time now is 09:36 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.