just a quick question.
#1

hey guys i just have a quick question i was curious on how to fix these warnings.

Код:
C:\Users\owner\Desktop\gta sa server\gamemodes\DDPDRIFT.pwn(3902) : warning 219: local variable "vehid" shadows a variable at a preceding level
C:\Users\owner\Desktop\gta sa server\gamemodes\DDPDRIFT.pwn(3913) : warning 219: local variable "vehid" shadows a variable at a preceding level
C:\Users\owner\Desktop\gta sa server\gamemodes\DDPDRIFT.pwn(3987) : warning 219: local variable "vehid" shadows a variable at a preceding level
C:\Users\owner\Desktop\gta sa server\gamemodes\DDPDRIFT.pwn(3998) : warning 219: local variable "vehid" shadows a variable at a preceding level
C:\Users\owner\Desktop\gta sa server\gamemodes\DDPDRIFT.pwn(4009) : warning 219: local variable "vehid" shadows a variable at a preceding level
C:\Users\owner\Desktop\gta sa server\gamemodes\DDPDRIFT.pwn(4028) : warning 219: local variable "vehid" shadows a variable at a preceding level
C:\Users\owner\Desktop\gta sa server\gamemodes\DDPDRIFT.pwn(4032) : warning 202: number of arguments does not match definition
C:\Users\owner\Desktop\gta sa server\gamemodes\DDPDRIFT.pwn(4033) : warning 202: number of arguments does not match definition
C:\Users\owner\Desktop\gta sa server\gamemodes\DDPDRIFT.pwn(4186) : warning 203: symbol is never used: "vehid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


9 Warnings.
and here are the problems.

Код:
new vehid;
if(strcmp("/sfadrift",cmdtext,true) == 0)
{
    new vehid = GetPlayerVehicleID(playerid);
	new str[128];
	format(str,sizeof(str),"Welcome to SFADRIFT!");
	SendClientMessage(playerid,-1,str);
	SetVehiclePos(vehid,-1190.52,211.47,14.07);
	SetPlayerPos(playerid,-1190.52,211.47,14.07);
	PutPlayerInVehicle(playerid,vehid,0);
	return 1;
}
 	if(strcmp("/tune2",cmdtext,true) == 0)
{
    new vehid = GetPlayerVehicleID(playerid);
	new str[128];
	format(str,sizeof(str),"Welcome to Tune2!");
	SendClientMessage(playerid,-1,str);
	SetVehiclePos(vehid,-1935.7684,236.3854,33.9708);
	SetPlayerPos(playerid,-1935.7684,236.3854,33.9708);
	PutPlayerInVehicle(playerid,vehid,0);
	return 1;
}
	if(strcmp("/tune",cmdtext,true) == 0)
{
 	new str[128];
 	format(str,sizeof(str),"Welcome to Tune!");
 	SendClientMessage(playerid,-1,str);
 	SetVehiclePos(playerid,-2721.7175,217.3232,4.1266);
 	SetPlayerPos(playerid,-2721.7175,217.3232,4.1266);
 	return 1;
}
	if(strcmp("/drift9",cmdtext,true) == 0)
{
	new str[128];
 	format(str,sizeof(str),"Welcome to Drift9!");
 	SendClientMessage(playerid,-1,str);
 	SetVehiclePos(playerid,-493.1131,1989.2092,59.8513);
 	SetPlayerPos(playerid,-493.1131,1989.2092,59.8513);
 	return 1;
}
	if(strcmp("/drift8",cmdtext,true) == 0)
{
	new str[128];
	format(str,sizeof(str),"Welcome to Drift8!");
	SendClientMessage(playerid,-1,str);
	SetVehiclePos(playerid,-312.2921,1540.4182,75.2216);
	SetPlayerPos(playerid,-312.2921,1540.4182,75.2216);
	return 1;
}
	if(strcmp("/drift7",cmdtext,true) == 0)
{
	new str[128];
	format(str,sizeof(str),"Welcome to Drift7!");
	SendClientMessage(playerid,-1,str);
	SetVehiclePos(playerid,2259.6487,1963.1309,31.4394);
	SetPlayerPos(playerid,2259.6487,1963.1309,31.4394);
	return 1;
}
  	if(strcmp("/drift6",cmdtext,true) == 0)
{
	new str[128];
	format(str,sizeof(str),"Welcome to Drift6!");
	SendClientMessage(playerid,-1,str);
	SetVehiclePos(playerid,2328.7517,1399.8760,42.4814);
	SetPlayerPos(playerid,2328.7517,1399.8760,42.4814);
	return 1;
}
  	if(strcmp("/drift5",cmdtext,true) == 0)
{
	new str[128];
	format(str,sizeof(str),"Welcome to drift5!");
	SendClientMessage(playerid,-1,str);
	SetVehiclePos(playerid,2499.1069,1272.4935,10.4722);
	SetPlayerPos(playerid,2499.1069,1272.4935,10.4722);
	return 1;
}
	if(strcmp("/drift4",cmdtext,true) == 0)
{
	new str[128];
	format(str,sizeof(str),"Welcome to drift4!");
	SendClientMessage(playerid,-1,str);
	SetVehiclePos(playerid,2806.3691,-1438.4415,39.7021);
	SetPlayerPos(playerid,2806.3691,-1438.4415,39.7021);
	return 1;
}
 	if(strcmp("/drift2",cmdtext,true) == 0)
{
    new vehid = GetPlayerVehicleID(playerid);
	new str[128];
	format(str,sizeof(str),"Welcome to drift3!");
	SendClientMessage(playerid,-1,str);
	SetVehiclePos(vehid,2717.1382,-1508.3368,29.9331);
	SetPlayerPos(playerid,2717.1382,-1508.3368,29.9331);
	PutPlayerInVehicle(playerid,vehid,0);
	return 1;
}
 	if(strcmp("/drift2",cmdtext,true) == 0)
{
    new vehid = GetPlayerVehicleID(playerid);
	new str[128];
	format(str,sizeof(str),"Welcome to drift2!");
	SendClientMessage(playerid,-1,str);
	SetVehiclePos(vehid,1257.6019,-2027.8704,59.1490);
	SetPlayerPos(playerid,1257.6019,-2027.8704,59.1490);
	PutPlayerInVehicle(playerid,vehid,0);
	return 1;
}
 	if(strcmp("/drift1",cmdtext,true) == 0)
{
    new vehid = GetPlayerVehicleID(playerid);
	new str[128];
	format(str,sizeof(str),"Welcome to drift1!");
	SendClientMessage(playerid,-1,str);
	SetVehiclePos(vehid,-57.5438,-1414.3257,11.427107);
	SetPlayerPos(playerid,-57.5438,-1414.3257,11.4271);
	PutPlayerInVehicle(playerid,vehid,0);
	return 1;
}
	if(strcmp("/respawn",cmdtext,true) == 0)
{
	new str[128];
	format(str,sizeof(str),"You Have Been ReSpawned!");
	SendClientMessage(playerid,-1,str);
	SetPlayerPos(playerid,-2423.2783,-609.5183,132.5589);
	return 1;
}
 	if(strcmp("/banktele",cmdtext,true) == 0)
{
    new vehid = GetPlayerVehicleID(playerid);
	new str[128];
	format(str,sizeof(str),"Welcome to DDP Bank!");
	SendClientMessage(playerid,-1,str);
	SetVehiclePos(vehid, -1738.52,13.55);
	SetPlayerPos(playerid, -1738.52,13.55);
	PutPlayerInVehicle(playerid,vehid,0);
	return 1;
}
Reply
#2

C:\Users\owner\Desktop\gta sa server\gamemodes\DDPDRIFT.pwn(3987) : warning 219: local variable "vehid" shadows a variable at a preceding level
on line 3987 delete "new vehid"
do that for each of this 'warning 219's
Do the same for:C:\Users\owner\Desktop\gta sa server\gamemodes\DDPDRIFT.pwn(4186) : warning 203: symbol is never used: "vehid":

C:\Users\owner\Desktop\gta sa server\gamemodes\DDPDRIFT.pwn(4033) : warning 202: number of arguments does not match definition
check https://sampwiki.blast.hk/ to see what arguments are missing.
Reply
#3

Quote:
Originally Posted by Roko_foko
Посмотреть сообщение
C:\Users\owner\Desktop\gta sa server\gamemodes\DDPDRIFT.pwn(3987) : warning 219: local variable "vehid" shadows a variable at a preceding level
on line 3987 delete "new vehid"
do that for each of this 'warning 219's
Do the same for:C:\Users\owner\Desktop\gta sa server\gamemodes\DDPDRIFT.pwn(4186) : warning 203: symbol is never used: "vehid":

C:\Users\owner\Desktop\gta sa server\gamemodes\DDPDRIFT.pwn(4033) : warning 202: number of arguments does not match definition
check https://sampwiki.blast.hk/ to see what arguments are missing.
well i fixed the 219s and the 203s but i cant seem to find anything about the 202s
Reply
#4

You don't need to format the strings, just SendClientMessage.
Reply
#5

Quote:
Originally Posted by CookieJar
Посмотреть сообщение
You don't need to format the strings, just SendClientMessage.
yeah ik idk why thats there lol
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)