Hallo Community,
habe gerade ein problem, ich bin an einem Gangwarsystem dran aber leider wollen meine Farben nicht wie es soll...
Habe diese Funktion ausm Englischen Forum
stock IntToHex(int)
{
new
str[15];
format(str, sizeof(str), "%x", int);
return str;
}
stock HexToInt(hex)
{
new
str[15];
format(str, sizeof(str), "%i", hex);
return strval(str);
}
Alles anzeigen
Habe einen INT Code in der Datenbank stehen, dieser geht eigentlich auch richtig in die log... aber sobald ich diese Gangzonen showen lassen will dann bekomme ich dauernd fehler...
forward GangwarZonenLaden();
public GangwarZonenLaden()
{
new string[50],data[20],idgw[5];
format(string,sizeof string,"SELECT * FROM `gangwar`");
mysql_query(string);
mysql_store_result();
while (mysql_fetch_row(string))
{
mysql_fetch_field("GWID",idgw);
GWInfo[strval(idgw)][GWID] = strval(idgw);
mysql_fetch_field("GWBesitzer",data);
GWInfo[strval(idgw)][GWBesitzer] = strval(data);
mysql_fetch_field("GWmX",data);
GWInfo[strval(idgw)][GWmX] = strval(data);
mysql_fetch_field("GWmY",data);
GWInfo[strval(idgw)][GWmY] = strval(data);
mysql_fetch_field("GWMAX",data);
GWInfo[strval(idgw)][GWMX] = strval(data);
mysql_fetch_field("GWMAY",data);
GWInfo[strval(idgw)][GWMY] = strval(data);
mysql_fetch_field("GWFarbe",data);
GWInfo[strval(idgw)][GWFarbe] = strval(data);
GWInfo[strval(idgw)][GWZone] = GangZoneCreate(GWInfo[strval(idgw)][GWmX], GWInfo[strval(idgw)][GWmY], GWInfo[strval(idgw)][GWMX], GWInfo[strval(idgw)][GWMY]);
printf("%d %s",GWInfo[strval(idgw)][GWID],IntToHex(GWInfo[strval(idgw)][GWFarbe]));
}
return 1;
}
Alles anzeigen
So lade ich meine Gangzonen...
So will ich meine Gangzonen anzeigen lassen:
GangZoneShowForPlayer(playerid, GWInfo[1][GWZone], IntToHex(GWInfo[1][GWFarbe]));
GangZoneShowForPlayer(playerid, GWInfo[2][GWZone], IntToHex(GWInfo[2][GWFarbe]));
GangZoneShowForPlayer(playerid, GWInfo[3][GWZone], IntToHex(GWInfo[3][GWFarbe]));
GangZoneShowForPlayer(playerid, GWInfo[4][GWZone], IntToHex(GWInfo[4][GWFarbe]));
Kriege dann folgende Errors:
C:\Users\morit\Desktop\eee\gamemodes\county.pwn(3289) : error 035: argument type mismatch (argument 3)
C:\Users\morit\Desktop\eee\gamemodes\county.pwn(3290) : error 035: argument type mismatch (argument 3)
C:\Users\morit\Desktop\eee\gamemodes\county.pwn(3291) : error 035: argument type mismatch (argument 3)
C:\Users\morit\Desktop\eee\gamemodes\county.pwn(3292) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
Verstehe einfach nciht warum es nicht möchte....
Bitte um sehr schnelle Hilfe..
MFG