Troble ?
#1

i'm add a filter this
https://sampforum.blast.hk/showthread.php?tid=449859
but it spawn this ?
C:\Documents and Settings\Admin\Desktop\VN-RP\gamemodes\modernliferp.pwn(160) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
C:\Documents and Settings\Admin\Desktop\VN-RP\gamemodes\modernliferp.pwn(193) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
C:\Documents and Settings\Admin\Desktop\VN-RP\gamemodes\modernliferp.pwn(272) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
C:\Documents and Settings\Admin\Desktop\VN-RP\pawno\include\YSI\internal\..\y_scriptinit.inc( 124) : error 021: symbol already defined: "OnFilterScriptInit"
C:\Documents and Settings\Admin\Desktop\VN-RP\pawno\include\YSI\y_iterate.inc(622) : error 021: symbol already defined: "OnPlayerConnect"
C:\Documents and Settings\Admin\Desktop\VN-RP\pawno\include\YSI\y_iterate.inc(906) : error 021: symbol already defined: "OnPlayerDisconnect"
C:\Documents and Settings\Admin\Desktop\VN-RP\pawno\include\zcmd.inc(84) : error 021: symbol already defined: "OnPlayerCommandText"
C:\Documents and Settings\Admin\Desktop\VN-RP\pawno\include\streamer.inc(380) : error 021: symbol already defined: "OnPlayerEnterCheckpoint"
C:\Documents and Settings\Admin\Desktop\VN-RP\pawno\include\OPSP.inc(160) : error 021: symbol already defined: "OnPlayerUpdate"
C:\Documents and Settings\Admin\Desktop\VN-RP\pawno\include\YSI\y_hooks/impl.inc(699) : error 021: symbol already defined: "OnPlayerSpawn"
C:\Documents and Settings\Admin\Desktop\VN-RP\pawno\include\YSI\y_hooks/impl.inc(742) : error 021: symbol already defined: "OnPlayerDeath"
C:\Documents and Settings\Admin\Desktop\VN-RP\pawno\include\YSI\y_hooks/impl.inc(1001) : error 021: symbol already defined: "OnPlayerEnterVehicle"
C:\Documents and Settings\Admin\Desktop\VN-RP\gamemodes\modernliferp.pwn(352) : warning 201: redefinition of constant/macro (symbol "COLOR_WHITE")
C:\Documents and Settings\Admin\Desktop\VN-RP\gamemodes\modernliferp.pwn(361) : warning 201: redefinition of constant/macro (symbol "COLOR_GREY")
C:\Documents and Settings\Admin\Desktop\VN-RP\gamemodes\modernliferp.pwn(365) : warning 201: redefinition of constant/macro (symbol "COLOR_RED")
C:\Documents and Settings\Admin\Desktop\VN-RP\gamemodes\modernliferp.pwn(367) : warning 201: redefinition of constant/macro (symbol "COLOR_GREEN")
C:\Documents and Settings\Admin\Desktop\VN-RP\gamemodes\modernliferp.pwn(36 : warning 201: redefinition of constant/macro (symbol "COLOR_YELLOW")
C:\Documents and Settings\Admin\Desktop\VN-RP\gamemodes\modernliferp.pwn(370) : warning 201: redefinition of constant/macro (symbol "COLOR_ORANGE")
C:\Documents and Settings\Admin\Desktop\VN-RP\gamemodes\modernliferp.pwn(374) : warning 201: redefinition of constant/macro (symbol "COLOR_BLUE")
C:\Documents and Settings\Admin\Desktop\VN-RP\gamemodes\modernliferp.pwn(12355) : warning 219: local variable "weather" shadows a variable at a preceding level
C:\Documents and Settings\Admin\Desktop\VN-RP\gamemodes\modernliferp.pwn(22863) : warning 219: local variable "weather" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


9 Errors.
Reply
#2

You got some global variables the same as the local ones, Change the local
pawn Код:
new weather
new PlayerName
To others then compile and show us the codes with errors
Reply
#3

Quote:
Originally Posted by xVIP3Rx
Посмотреть сообщение
You got some global variables the same as the local ones, Change the local
pawn Код:
new weather
new PlayerName
To others then compile and show us the codes with errors
need
#new <weather>
#new <playername> ??
Reply
#4

I mean There is already
pawn Код:
new Weather
and
pawn Код:
new playername
somewhere, You'll have to change the local variables to another name, Or show me the code.
Reply
#5

How to show code ?
Reply
#6

Copy the code, Paste it here...
Reply
#7

All or just code error ?
Reply
#8

Just The line or the function/Command with errors
Reply
#9

Код:
#endif
#define SERVER_GM_TEXT "A:RP v3.7"
#define SERVER_GM_LAST_UPDATE "Unknown" // Format: Month / Day / Year
#define SERVER_GM_UPDATER "Roy Nash"
#define SERVER_BEGIN "23759" // Since first time
#define SERVER_EDITED "50102"// Edited of the gm
#define SERVER_SECURITY "176.227.201.34" // 66.85.141.76
#define SERVER_WEBSITE "YOURFORUMURL"
#define SERVER_TS3 "TEAMSPEAKIP"
#define SERVER_HOSTNAME "[Open Beta] Viet Nam Roleplay[VietNam|Refund]"

#if defined Server_ToDoList
-> VIP Garage / Cars
-> VIP Interior change
#endif

// Includes
#include <a_samp>
#new weather
#new PlayerName



#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BLUE	0x0000BBAA
#define COLOR_ORANGE 0xFF9900AA

forward message();

forward located(playerid);
forward weather(playerid);
forward respond(playerid);

new playeronmission[MAX_PLAYERS];
new someoneonmission = 0;


new missionstart[MAX_PLAYERS];

new ready[MAX_PLAYERS];
new confirmed[MAX_PLAYERS];




public OnFilterScriptInit()
{
	//ship
    CreateObject(3885, -3682.36, 2167.75, 9.02,   0.00, 0.00, 0.00);
	CreateObject(11237, -3637.29, 2168.08, 29.78,   356.86, 0.00, 3.14);
	CreateObject(10772, -3636.71, 2174.36, 7.92,   356.86, 0.00, 3.14);
	CreateObject(10770, -3634.18, 2167.92, 28.18,   356.86, 0.00, 0.81);
	CreateObject(3885, -1324.33, 493.81, 21.02,   0.00, 0.00, 0.00);
	CreateObject(3884, -3682.50, 2168.02, 8.97,   0.00, 0.00, 0.00);
	CreateObject(3884, -1055.90, 629.34, 21.05,   0.00, 0.00, 0.00);
	CreateObject(10771, -3637.30, 2174.47, -3.82,   0.00, 0.00, 0.12);
	CreateObject(11145, -3698.99, 2173.73, -4.91,   -0.08, 0.00, 0.00);

	CreateVehicle(563, 1766.2301, -2288.3789, 27.6662, 0.0000, -1, -1, 100);
	CreateVehicle(563, 1752.7321, -2276.9583, 27.6662, 0.0000, -1, -1, 100);
	CreateVehicle(563, 1779.2180, -2274.5632, 27.6662, 0.0000, -1, -1, 100);
	CreateVehicle(563, 1779.3127, -2295.6416, 27.6662, 0.0000, -1, -1, 100);
	CreateVehicle(563, 1752.9891, -2296.1980, 27.6662, 0.0000, -1, -1, 100);

	SetTimer("message", 60000, false);
	return 1;
}



public message()
{
	if(someoneonmission == 1)
	{
	    return 1;
 	}
 	else
 	{
	SendClientMessageToAll(COLOR_RED, "MAYDAY MAYDAY! Co mot con tau va co rat nhieu nguoi va con tau dang chim! Ai tra loi ?! (/respond)" );
	SetTimer("message", 600000, false);
	return 1;
	}
}
public OnPlayerConnect(playerid)
{
	SendClientMessage(playerid, COLOR_ORANGE, "This server is using KingyKings Rescue Minimission!");
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	if(playeronmission[playerid] == 1)
	{
	    new string[128];
		new PlayerName[MAX_PLAYER_NAME];
		GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
	    SendClientMessage(playerid, COLOR_RED, "Cuu Ho: Ban da khong hoan thanh, toi rat xin loi.");
	    StopAudioStreamForPlayer(playerid);
	    format(string,sizeof(string),"%s Da khong hoan thanh nhiem vu cuu ho tren con tau dang chim.",PlayerName,playerid);
		SendClientMessageToAll(COLOR_GREEN, string);
		someoneonmission = 0;
		confirmed[playerid] = 0;
		missionstart[playerid] = 0;
		ready[playerid] = 0;
	    return 1;
 	}

	return 1;

}

public OnPlayerSpawn(playerid)
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if(!strcmp(cmdtext, "/respond", true))
    {
		if(missionstart[playerid] == 1)
		{
		    SendClientMessage(playerid, COLOR_RED, "Cuu Ho: Ban co that su nghiem tuc? Ban da tham gia nhiem vu cua chung toi...");
	  		return 1;
	  	}

        new string[128];
		new PlayerName[MAX_PLAYER_NAME];
		GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
	    format(string,sizeof(string),"%s Da dong y nhiem vu cuu nguoi dan tren con tau dang chim!",PlayerName,playerid);
        SendClientMessage(playerid, COLOR_GREEN, "Cuu Ho: Cam on ban rat nhieu vi da tra loi, len may bay cuu ho gap!");
        SetPlayerPos(playerid, 1758.8708, -2289.1699, 30.3858);
        missionstart[playerid] = 1;

        return 1;
    }
    if(!strcmp(cmdtext, "/confirm", true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 100.00, -3567.0063,2175.6995,10.7916))
    	{
        SendClientMessage(playerid, COLOR_GREEN, "Toi: Toi muon xac nhan khong co ai tren con tau. Over.");
        SendClientMessage(playerid, COLOR_RED, "Duoc roi, chung toi dang doi phan ung.");
        DisablePlayerCheckpoint(playerid);
        SetTimer("respond", 10000, false);
        SetPlayerCheckpoint(playerid, 1758.8708, -2289.1699, 30.3858, 20.0);
        StopAudioStreamForPlayer(playerid);
        confirmed[playerid] = 1;
		return 1;
		}
    }
	return 0;
}
public respond(playerid)
{
    SendClientMessage(playerid, COLOR_GREEN, "Sep: Xac nhan, cam on, lam on quay lai tram.");
    PlayAudioStreamForPlayer(playerid, "http://dc534.4shared.com/img/1608897125/798552a9/dlink__2Fdownload_2FoqIJXMQu_3Ftsid_3D20130710-95621-c084a8c0/preview.mp3");
}
public OnPlayerDisconnect(playerid)
{
	return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	if(ready[playerid] == 0)
	{
		if(GetVehicleModel(vehicleid) == 563)
		{
	    	SendClientMessage(playerid, COLOR_GREEN, "Cuu Ho: Chao mung tro lai tram, lam on cho biet lam sao ban co the dinh vi duoc con tau ?.");
	    	SetTimer("located", 10000, false);
		}
		else
		{
		if(ready[playerid] == 1)
  		{
  		    SendClientMessage(playerid, COLOR_RED, "Cuu Ho: Duoc roi, hay chac chan ban /confirm de biet duoc vi tri con tau.");
  		}
  		}
	}

    return 1;
}

public located(playerid)
{
    PlayAudioStreamForPlayer(playerid, "http://xanimax.free.fr/mp3/epic/Dr.Who%20-%20I%20am%20the%20Doctor.mp3");
	SendClientMessage(playerid, COLOR_RED, "Cuu Ho: Chung ta da biet duoc vi tri con tau, chung toi da gui no cho ban tren radar. Chuc may man.");
	SendClientMessage(playerid, COLOR_RED, "Cuu Ho: Khi ban den do, nhin thay nguoi tren tau hay /confirm cho chung toi!");
	SetTimer("weather", 10000, false);
	SetPlayerCheckpoint(playerid, -3567.0063,2175.6995,10.7916, 100.00);

	return 1;
}
public weather(playerid)
{
	SetPlayerWeather(playerid, 08);
	SetPlayerTime(playerid, 0, 0);
	SendClientMessage(playerid, COLOR_RED, "Cuu Ho: Uh-oh, thoi tiet sao te qua, hay can than!");
	ready[playerid] = 1;
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	if(confirmed[playerid] == 1)
	{
	    new string[128];
		new PlayerName[MAX_PLAYER_NAME];
		StopAudioStreamForPlayer(playerid);
		GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
	    format(string,sizeof(string),"%s Da thanh cong trong nhiem vu giai cuu con tau. Chuc mung!",PlayerName,playerid);
	    SendClientMessage(playerid, COLOR_RED, "Cuu Ho: Chao mung quay tro lai tram cuu ho! Ban da hoan thanh xuat sac nhiem vu. Tot lam!");
	    PlayerPlaySound(playerid, 1058, 0, 0, 0);
	    GameTextForPlayer(playerid, "Mission Complete +50000", 5000, 1);
        DisablePlayerCheckpoint(playerid);
		GivePlayerMoney(playerid, 50000);
		someoneonmission = 0;
		confirmed[playerid] = 0;
		missionstart[playerid] = 0;
		ready[playerid] = 0;

		return 1;
	}
    return 1;
}
public OnPlayerUpdate(playerid)
{
	return 1;
}

#include <a_players>
#include <dini>
#include <dudb>
#include <dutils>
#pragma unused ret_memcpy
#include <foreach>
#include <sscanf2>
#include <zcmd>
#include <streamer>
#include <OPSP>
#include <progress>
#include <gvc>
#include <mxINI> // Radio Plugin
#include <mSelection>
#include <YSI\y_ini>
//#include <irc>
My sever it't Vietnamese
Reply
#10

I edited that and compiled with no errors, Here you go
pawn Код:
#include <a_samp>
#include <a_players>
#include <dini>
#include <dudb>
#include <dutils>
#pragma unused ret_memcpy
#include <foreach>
#include <sscanf2>
#include <zcmd>
#include <streamer>
#include <OPSP>
#include <progress>
#include <gvc>
#include <mxINI> // Radio Plugin
#include <mSelection>
#include <YSI\y_ini>
//#include <irc>

#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BLUE  0x0000BBAA
#define COLOR_ORANGE 0xFF9900AA
#define SERVER_GM_TEXT "A:RP v3.7"
#define SERVER_GM_LAST_UPDATE "Unknown" // Format: Month / Day / Year
#define SERVER_GM_UPDATER "Roy Nash"
#define SERVER_BEGIN "23759" // Since first time
#define SERVER_EDITED "50102"// Edited of the gm
#define SERVER_SECURITY "176.227.201.34" // 66.85.141.76
#define SERVER_WEBSITE "YOURFORUMURL"
#define SERVER_TS3 "TEAMSPEAKIP"
#define SERVER_HOSTNAME "[Open Beta] Viet Nam Roleplay[VietNam|Refund]"

forward message();
forward located(playerid);
forward weather(playerid);
forward respond(playerid);

#if defined Server_ToDoList
-> VIP Garage / Cars
-> VIP Interior change
#endif

new playeronmission[MAX_PLAYERS];
new someoneonmission = 0;
new missionstart[MAX_PLAYERS];
new ready[MAX_PLAYERS];
new confirmed[MAX_PLAYERS];

public OnFilterScriptInit()
{
    //ship
    CreateObject(3885, -3682.36, 2167.75, 9.02,   0.00, 0.00, 0.00);
    CreateObject(11237, -3637.29, 2168.08, 29.78,   356.86, 0.00, 3.14);
    CreateObject(10772, -3636.71, 2174.36, 7.92,   356.86, 0.00, 3.14);
    CreateObject(10770, -3634.18, 2167.92, 28.18,   356.86, 0.00, 0.81);
    CreateObject(3885, -1324.33, 493.81, 21.02,   0.00, 0.00, 0.00);
    CreateObject(3884, -3682.50, 2168.02, 8.97,   0.00, 0.00, 0.00);
    CreateObject(3884, -1055.90, 629.34, 21.05,   0.00, 0.00, 0.00);
    CreateObject(10771, -3637.30, 2174.47, -3.82,   0.00, 0.00, 0.12);
    CreateObject(11145, -3698.99, 2173.73, -4.91,   -0.08, 0.00, 0.00);

    CreateVehicle(563, 1766.2301, -2288.3789, 27.6662, 0.0000, -1, -1, 100);
    CreateVehicle(563, 1752.7321, -2276.9583, 27.6662, 0.0000, -1, -1, 100);
    CreateVehicle(563, 1779.2180, -2274.5632, 27.6662, 0.0000, -1, -1, 100);
    CreateVehicle(563, 1779.3127, -2295.6416, 27.6662, 0.0000, -1, -1, 100);
    CreateVehicle(563, 1752.9891, -2296.1980, 27.6662, 0.0000, -1, -1, 100);

    SetTimer("message", 60000, false);
    return 1;
}



public message()
{
    if(someoneonmission == 1)
    {
        return 1;
    }
    else
    {
    SendClientMessageToAll(COLOR_RED, "MAYDAY MAYDAY! Co mot con tau va co rat nhieu nguoi va con tau dang chim! Ai tra loi ?! (/respond)" );
    SetTimer("message", 600000, false);
    return 1;
    }
}
public OnPlayerConnect(playerid)
{
    SendClientMessage(playerid, COLOR_ORANGE, "This server is using KingyKings Rescue Minimission!");
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    if(playeronmission[playerid] == 1)
    {
        new string[128];
        new PlayerName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
        SendClientMessage(playerid, COLOR_RED, "Cuu Ho: Ban da khong hoan thanh, toi rat xin loi.");
        StopAudioStreamForPlayer(playerid);
        format(string,sizeof(string),"%s Da khong hoan thanh nhiem vu cuu ho tren con tau dang chim.",PlayerName,playerid);
        SendClientMessageToAll(COLOR_GREEN, string);
        someoneonmission = 0;
        confirmed[playerid] = 0;
        missionstart[playerid] = 0;
        ready[playerid] = 0;
        return 1;
    }

    return 1;

}

public OnPlayerSpawn(playerid)
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/respond", true))
    {
        if(missionstart[playerid] == 1)
        {
            SendClientMessage(playerid, COLOR_RED, "Cuu Ho: Ban co that su nghiem tuc? Ban da tham gia nhiem vu cua chung toi...");
            return 1;
        }

        new string[128];
        new PlayerName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
        format(string,sizeof(string),"%s Da dong y nhiem vu cuu nguoi dan tren con tau dang chim!",PlayerName,playerid);
        SendClientMessage(playerid, COLOR_GREEN, "Cuu Ho: Cam on ban rat nhieu vi da tra loi, len may bay cuu ho gap!");
        SetPlayerPos(playerid, 1758.8708, -2289.1699, 30.3858);
        missionstart[playerid] = 1;

        return 1;
    }
    if(!strcmp(cmdtext, "/confirm", true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 100.00, -3567.0063,2175.6995,10.7916))
        {
        SendClientMessage(playerid, COLOR_GREEN, "Toi: Toi muon xac nhan khong co ai tren con tau. Over.");
        SendClientMessage(playerid, COLOR_RED, "Duoc roi, chung toi dang doi phan ung.");
        DisablePlayerCheckpoint(playerid);
        SetTimer("respond", 10000, false);
        SetPlayerCheckpoint(playerid, 1758.8708, -2289.1699, 30.3858, 20.0);
        StopAudioStreamForPlayer(playerid);
        confirmed[playerid] = 1;
        return 1;
        }
    }
    return 0;
}
public respond(playerid)
{
    SendClientMessage(playerid, COLOR_GREEN, "Sep: Xac nhan, cam on, lam on quay lai tram.");
    PlayAudioStreamForPlayer(playerid, "http://dc534.4shared.com/img/1608897125/798552a9/dlink__2Fdownload_2FoqIJXMQu_3Ftsid_3D20130710-95621-c084a8c0/preview.mp3");
}
public OnPlayerDisconnect(playerid)
{
    return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(ready[playerid] == 0)
    {
        if(GetVehicleModel(vehicleid) == 563)
        {
            SendClientMessage(playerid, COLOR_GREEN, "Cuu Ho: Chao mung tro lai tram, lam on cho biet lam sao ban co the dinh vi duoc con tau ?.");
            SetTimer("located", 10000, false);
        }
        else
        {
        if(ready[playerid] == 1)
        {
            SendClientMessage(playerid, COLOR_RED, "Cuu Ho: Duoc roi, hay chac chan ban /confirm de biet duoc vi tri con tau.");
        }
        }
    }

    return 1;
}

public located(playerid)
{
    PlayAudioStreamForPlayer(playerid, "http://xanimax.free.fr/mp3/epic/Dr.Who%20-%20I%20am%20the%20Doctor.mp3");
    SendClientMessage(playerid, COLOR_RED, "Cuu Ho: Chung ta da biet duoc vi tri con tau, chung toi da gui no cho ban tren radar. Chuc may man.");
    SendClientMessage(playerid, COLOR_RED, "Cuu Ho: Khi ban den do, nhin thay nguoi tren tau hay /confirm cho chung toi!");
    SetTimer("weather", 10000, false);
    SetPlayerCheckpoint(playerid, -3567.0063,2175.6995,10.7916, 100.00);

    return 1;
}
public weather(playerid)
{
    SetPlayerWeather(playerid, 08);
    SetPlayerTime(playerid, 0, 0);
    SendClientMessage(playerid, COLOR_RED, "Cuu Ho: Uh-oh, thoi tiet sao te qua, hay can than!");
    ready[playerid] = 1;
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    if(confirmed[playerid] == 1)
    {
        new string[128];
        new PlayerName[MAX_PLAYER_NAME];
        StopAudioStreamForPlayer(playerid);
        GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
        format(string,sizeof(string),"%s Da thanh cong trong nhiem vu giai cuu con tau. Chuc mung!",PlayerName,playerid);
        SendClientMessage(playerid, COLOR_RED, "Cuu Ho: Chao mung quay tro lai tram cuu ho! Ban da hoan thanh xuat sac nhiem vu. Tot lam!");
        PlayerPlaySound(playerid, 1058, 0, 0, 0);
        GameTextForPlayer(playerid, "Mission Complete +50000", 5000, 1);
        DisablePlayerCheckpoint(playerid);
        GivePlayerMoney(playerid, 50000);
        someoneonmission = 0;
        confirmed[playerid] = 0;
        missionstart[playerid] = 0;
        ready[playerid] = 0;

        return 1;
    }
    return 1;
}
public OnPlayerUpdate(playerid)
{
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)