Color error?
#1

Whats wrong with this script, When I compile it, I get the error code::"error 010: invalid function or declaration"


new Grove;
new Seville;
new Ballas;
new Ballas2;
new Ballas1;


Grove = GangZoneCreate(2204.798, -1930.57, 2626.913, -1634.489);
Seville = GangZoneCreate(2208.601, -2195.068, 2817.055, -1930.57);
Ballas1 = GangZoneCreate(1835.923, -1752.921, 2204.798, -1638.437);
Ballas2 = GangZoneCreate(1835.923, -1895.04, 2204.798, -1752.921);
Reply
#2

Add the last 4 lines that you use GangZoneCreate in OnGameModeInit or OnFilterScriptInit (depends on what you're working on). Adding those lines outside of any callback will give error 010.
Reply
#3

nevermind let me try something.
Reply
#4

Here we go, i did as you said
I get 3 warnings

error 001: expected token: ",", but found "-identifier-"
error 029: invalid expression, assumed zero
warning 215: expression has no effect

Code

//Gangzones
new Grove;
new Seville;
new Ballas;
new Ballas2;
new Ballas1;
new Aztecas;
new Aztecas1;
new Temple;
new TempleBallas;
new Vagos;
new Vagos2;
new LC;
-------------
public OnPlayerConnect(playerid)
{
GangZoneShowForPlayer(playerid, LC, 0x80400087);
GangZoneShowForPlayer(playerid, Grove, 0x00FF0080);
GangZoneShowForPlayer(playerid, Seville, 0x80FF8096);
GangZoneShowForPlayer(playerid, Ballas, 0x80008096);
GangZoneShowForPlayer(playerid, Ballas1, 0x80008096);
GangZoneShowForPlayer(playerid, Ballas2, 0x80008096);
GangZoneShowForPlayer(playerid, Temple, 0x00804096);
GangZoneShowForPlayer(playerid, Aztecas, 0x00FFFF96);
GangZoneShowForPlayer(playerid, Aztecas1, 0x00FFFF67);
GangZoneShowForPlayer(playerid, TempleBallas, 0xFF00FFAA);
GangZoneShowForPlayer(playerid, Vagos2, 0xFFD700AA);
GangZoneShowForPlayer(playerid, Vagos, 0xFFD700AA);
-----------

public OnGameModeInit()
{
//------------[Gangzone]--------------------------------//
Grove = GangZoneCreate(2204.798, -1930.57, 2626.913, -1634.489);
Seville = GangZoneCreate(2208.601, -2195.068, 2817.055, -1930.57);
Ballas1 = GangZoneCreate(1835.923, -1752.921, 2204.798, -1638.437);
Ballas2 = GangZoneCreate(1835.923, -1895.04, 2204.798, -1752.921);
Aztecas = GangZoneCreate(1573.528, -2199.016, 2212.404, -1895.04);
Aztecas1 = GangZoneCreate(1691.416, -1847.667, 1801.698, -1571.325);
Temple = GangZoneCreate(790.1434, -1164.708, 1413.808, -904.1568);
TempleBallas = GangZoneCreate(820.566, -1413.416, 1432.823, -1156.812);
Vagos = GangZoneCreate(2619.307, -1938.465, 2908.323, -1038.38);
Vagos2 = GangZoneCreate(2421.56, -1622.646, 2611.702, -1022.589);
Ballas = GangZoneCreate(1839.726, -1638.437, 2429.166, -1144.969
LC= GangZoneCreate(1835.923, -1085.753, 2406.349, -923.8955);
);
Reply
#5

pawn Код:
#include <a_samp>

new Grove;
new Seville;
new Ballas;
new Ballas2;
new Ballas1;
new Aztecas;
new Aztecas1;
new Temple;
new TempleBallas;
new Vagos;
new Vagos2;
new LC;

public OnGameModeInit()
{
    Grove = GangZoneCreate(2204.798, -1930.57, 2626.913, -1634.489);
    Seville = GangZoneCreate(2208.601, -2195.068, 2817.055, -1930.57);
    Ballas1 = GangZoneCreate(1835.923, -1752.921, 2204.798, -1638.437);
    Ballas2 = GangZoneCreate(1835.923, -1895.04, 2204.798, -1752.921);
    Aztecas = GangZoneCreate(1573.528, -2199.016, 2212.404, -1895.04);
    Aztecas1 = GangZoneCreate(1691.416, -1847.667, 1801.698, -1571.325);
    Temple = GangZoneCreate(790.1434, -1164.708, 1413.808, -904.1568);
    TempleBallas = GangZoneCreate(820.566, -1413.416, 1432.823, -1156.812);
    Vagos = GangZoneCreate(2619.307, -1938.465, 2908.323, -1038.38);
    Vagos2 = GangZoneCreate(2421.56, -1622.646, 2611.702, -1022.589);
    Ballas = GangZoneCreate(1839.726, -1638.437, 2429.166, -1144.969);
    LC= GangZoneCreate(1835.923, -1085.753, 2406.349, -923.8955);
    return 1;
}

public OnPlayerConnect(playerid)
{
    GangZoneShowForPlayer(playerid, LC, 0x80400087);
    GangZoneShowForPlayer(playerid, Grove, 0x00FF0080);
    GangZoneShowForPlayer(playerid, Seville, 0x80FF8096);
    GangZoneShowForPlayer(playerid, Ballas, 0x80008096);
    GangZoneShowForPlayer(playerid, Ballas1, 0x80008096);
    GangZoneShowForPlayer(playerid, Ballas2, 0x80008096);
    GangZoneShowForPlayer(playerid, Temple, 0x00804096);
    GangZoneShowForPlayer(playerid, Aztecas, 0x00FFFF96);
    GangZoneShowForPlayer(playerid, Aztecas1, 0x00FFFF67);
    GangZoneShowForPlayer(playerid, TempleBallas, 0xFF00FFAA);
    GangZoneShowForPlayer(playerid, Vagos2, 0xFFD700AA);
    GangZoneShowForPlayer(playerid, Vagos, 0xFFD700AA);
    return 1;
}
Reply
#6

I keep getting different warnings. How would I do this if it was supposed to be a filterscript?
Reply
#7

Quote:
Originally Posted by Miia
Посмотреть сообщение
I keep getting different warnings. How would I do this if it was supposed to be a filterscript?
OnFilterScriptInit.

Post your warnings. Nobody can help you fix warnings if you don't show us the actual warnings..

Also, why does your title say 'color error'? It says nothing about colors..
Reply
#8

I asked, How am I supposed to do it, if it should be a FS. I got no warnings yet, since I am not sure how to make it in a FS
Reply
#9

Nevermind, I made it work in the gamemode


Thanks for the help.
Reply
#10

Quote:
Originally Posted by Miia
Посмотреть сообщение
I asked, How am I supposed to do it, if it should be a FS. I got no warnings yet, since I am not sure how to make it in a FS
All you need to do is define FILTERSCRIPT and use OnFilterScriptInit/OnFilterScriptExit callbacks.

pawn Код:
#define FILTERSCRIPT
   
#include <a_samp>
   
public OnFilterScriptInit()
{
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)