#1

http://pastebin.com/qfDS9vNL

What give this errors?

C:\Users\DAVIDE\Desktop\a.pwn(42) : error 017: undefined symbol "Count"
C:\Users\DAVIDE\Desktop\a.pwn(42) : warning 215: expression has no effect
C:\Users\DAVIDE\Desktop\a.pwn(63) : error 017: undefined symbol "Count"
C:\Users\DAVIDE\Desktop\a.pwn(64) : error 017: undefined symbol "Count"
C:\Users\DAVIDE\Desktop\a.pwn(64) : warning 215: expression has no effect
C:\Users\DAVIDE\Desktop\a.pwn(66) : error 017: undefined symbol "MyTimer"
C:\Users\DAVIDE\Desktop\a.pwn(66) : warning 215: expression has no effect
C:\Users\DAVIDE\Desktop\a.pwn(66) : error 001: expected token: ";", but found "]"
C:\Users\DAVIDE\Desktop\a.pwn(66) : error 029: invalid expression, assumed zero
C:\Users\DAVIDE\Desktop\a.pwn(66) : fatal error 107: too many error messages on one line

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


7 Errors.

Thx for help!
Reply
#2

Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
#include <streamer>

new MyTimer[MAX_PLAYERS];//gang 1
new Count;//gang 1

#if defined FILTERSCRIPT



public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("Blank Script");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    Count=60;
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/capture", cmdtext, true, 10) == 0)
    {
    	if(Count <= 59)
		{
			SendClientMessage(playerid, 0xFFFFFF, "ERROR:This gang is already under capture.");
		}
		else
		{
    		Count = 60;
    		SendClientMessage(playerid,0xfff000,"+1 secondo");
    		KillTimer(MyTimer[playerid]);
    		MyTimer[playerid] = SetTimerEx("TestFunction", 1000, 1, "i", playerid);
    	}
    	return 1;
    }
    return 0;
}

forward TestFunction(playerid);//upc
public TestFunction(playerid)//upc
{
	Count--;
	if(Count == 0)
	{
		SendClientMessage(playerid, 0xff00000, "+ 1 minuto.");
		KillTimer(MyTimer[playerid]);
		Count =  60;
	}
	return 1;
}
This should work.

EDIT: Make sure these
Код:
new MyTimer[MAX_PLAYERS];//gang 1
new Count;//gang 1
don't go under #if defined FILTERSCRIPT. They must be ABOVE it, under #include <a_samp>
Reply
#3

Quote:
Originally Posted by SmoW
Посмотреть сообщение
Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
#include <streamer>

new MyTimer[MAX_PLAYERS];//gang 1
new Count;//gang 1

#if defined FILTERSCRIPT



public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("Blank Script");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    Count=60;
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/capture", cmdtext, true, 10) == 0)
    {
    	if(Count <= 59)
		{
			SendClientMessage(playerid, 0xFFFFFF, "ERROR:This gang is already under capture.");
		}
		else
		{
    		Count = 60;
    		SendClientMessage(playerid,0xfff000,"+1 secondo");
    		KillTimer(MyTimer[playerid]);
    		MyTimer[playerid] = SetTimerEx("TestFunction", 1000, 1, "i", playerid);
    	}
    	return 1;
    }
    return 0;
}

forward TestFunction(playerid);//upc
public TestFunction(playerid)//upc
{
	Count--;
	if(Count == 0)
	{
		SendClientMessage(playerid, 0xff00000, "+ 1 minuto.");
		KillTimer(MyTimer[playerid]);
		Count =  60;
	}
	return 1;
}
This should work.

EDIT: Make sure these
Код:
new MyTimer[MAX_PLAYERS];//gang 1
new Count;//gang 1
don't go under #if defined FILTERSCRIPT. They must be ABOVE it, under #include <a_samp>
Thanks you!
Reply
#4

Quote:
Originally Posted by BlackEvils
Посмотреть сообщение
Thanks you!
No probelm!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)