How can i do this ?
#1

i want to load the color of the GangZone but doesnt work i get 1 error

Код:
error 035: argument type mismatch (argument 3)
The Error Code
pawn Код:
//Pers File
forward PerseTerritories(playerid, name[], value[]);
public PerseTerritories(playerid, name[], value[])
{
if(!strcmp(name, "Retake1")) SetPVarString(playerid, "Retake1", value);
}

//later on
INI_ParseFile("/Territories/Areas.txt", "PerseTerritories", false, true, playerid, true, false);
new Color[15]; GetPVarString(playerid, "Retake1", Color, sizeof Color);
GangZoneShowForPlayer(playerid, AreaRetake1,Color); //ERROR LINE IS HERE :|
Reply
#2

Are you sure you did:
pawn Код:
AreaRetake1 = GangZoneCreate(..);
Reply
#3

Quote:
Originally Posted by Biesmen
Посмотреть сообщение
Are you sure you did:
pawn Код:
AreaRetake1 = GangZoneCreate(..);
yeah of course
Reply
#4

Let me quote myself:
Quote:
Originally Posted by Vince
Посмотреть сообщение
I do not know why people seem to think all the time that colors are strings, because they are not. Colors are just numbers. A little more into depth: Wanna know why using -1 as color gives you white? Contrary to popular believe, it is not the 'default' color, but white (well, technically that's the default color, but if the SA-MP team decides to change it to something else, it won't be anymore). -1 equals 0xFFFFFFFF in hexadecimal notation (try it on a calculator), which - as you may know - is white.
Reply
#5

Color[15] is wrong. The color isn't a string, is a number (Hex or Decimal)

pawn Код:
forward PerseTerritories(playerid, name[], value);
public PerseTerritories(playerid, name[], value)
{
if(!strcmp(name, "Retake1")) SetPVarInt(playerid, "Retake1", value);
}

//later on
INI_ParseFile("/Territories/Areas.txt", "PerseTerritories", false, true, playerid, true, false);
new Color;
Color = GetPVarInt(playerid, "Retake1");
GangZoneShowForPlayer(playerid, AreaRetake1,Color);
Reply
#6

thanks to all your help it works now
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)