Jump to content
  • 0

Load Turfs


norton.

Question

Problema intalnita (descriere): Nu mi se incarca teritoriile.
Ero(area / rile) / warning-(ul / urile): 0
Liniile de cod / sursa / script-ul: Am pus:

forward LoadTurfs();
public LoadTurfs()
{
    new tempp[124], TotalTurfs;
    cache_get_data(rows, fields);
    while(TotalTurfs < rows)
    {
        cache_get_row(TotalTurfs, 0, tempp), TurfInfo[TotalTurfs][tID] = strval(tempp);
        cache_get_row(TotalTurfs, 1, tempp), TurfInfo[TotalTurfs][tOwned] = strval(tempp);
        cache_get_row(TotalTurfs, 2, tempp), TurfInfo[TotalTurfs][tTime] = strval(tempp);
        cache_get_row(TotalTurfs, 3, tempp), TurfInfo[TotalTurfs][tMinX] = floatstr(tempp);
        cache_get_row(TotalTurfs, 4, tempp), TurfInfo[TotalTurfs][tMinY] = floatstr(tempp);
        cache_get_row(TotalTurfs, 5, tempp), TurfInfo[TotalTurfs][tMaxX] = floatstr(tempp);
        cache_get_row(TotalTurfs, 6, tempp), TurfInfo[TotalTurfs][tMaxY] = floatstr(tempp);
        cache_get_row(TotalTurfs, 7, tempp), TurfInfo[TotalTurfs][tNr] = strval(tempp);
        cache_get_row(TotalTurfs, 8, tempp), TurfInfo[TotalTurfs][tNrSize] = strval(tempp);
        TotalTurfs++;
    }
    printf("%d turfs loaded",TotalTurfs);
    return 1;
}

Si la 'ongamemodeinit' dupa conexiunea MYSQL am pus:

mysql_function_query(handle, "SELECT * FROM `turfs`", true, "LoadTurfs", "");

* Folosesc MYSQL R34

Imagini / Video (optional): -
Ati incercat sa rezolvati singur?: Da

Edited by norton.
Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

Ai in baza de date Trufs ?

Y!M: menyx.official

Skype: menyx.official

 

 

Inainte de a critica o persoana indiferent de etnie/varsta/inteligenta ei uita-te la tine si nu uita ca toti suntem Oameni si ca nu are sens sa incerci sa pari diferit!Daca esti mai prost/destept decat cel scos/aflat in discutie incearca sa nu faci pe "MR. Inteligent" TACI si FACI!

Respecta membrii acestei comunitati daca ai pretentia sa fi respectat si tratat(a) ca pe o fiinta umana!

 

Nu fac nimic remarcabil, dar ceea ce fac este esenţial.•

 

Link to comment
Share on other sites

  • 0

Da mie mi se incarca, ati vazut ca acolo am un "printf" si cand deschide imi zice ca am 35 Turfs si atatea am. Dar nu mi se creeaza, trebuie sa mi se creeze dar nu se creeaza, cand intru pe server nu apar.

La OnGameModeInit am pus:

for(new i = 1; i < sizeof(TurfInfo); i++)
	{
	    Turfs = GangZoneCreate(TurfInfo[tMinX],TurfInfo[tMinY],TurfInfo[tMaxX],TurfInfo[tMaxY], TurfInfo[tNr], TurfInfo[tNrSize]);
	}

In MYSQL log totu e ok. -> Poza:

Am dat si in jos si m-am uitat si scrie ca totu e OK

DzPteVN.png

Edited by norton.
Link to comment
Share on other sites

  • 0
forward LoadTurfs();
public LoadTurfs()
{
    new tempp[124], TotalTurfs;
    cache_get_data(rows, fields);
    for(TotalTurfs = 0; TotalTurfs < rows; TotalTurfs++)
    {
        TurfInfo[TotalTurfs][tID] = cache_get_row_int(TotalTurfs, 0);
        TurfInfo[TotalTurfs][tOwned] = cache_get_row_int(TotalTurfs, 1);
        TurfInfo[TotalTurfs][tTime] = cache_get_row_int(TotalTurfs, 2);
        TurfInfo[TotalTurfs][tMinX] = cache_get_row_float(TotalTurfs, 3);
        TurfInfo[TotalTurfs][tMinY] = cache_get_row_float(TotalTurfs, 4);
        TurfInfo[TotalTurfs][tMaxX] = cache_get_row_float(TotalTurfs, 5);
        TurfInfo[TotalTurfs][tMaxY] = cache_get_row_float(TotalTurfs, 6);
        TurfInfo[TotalTurfs][tNr] = cache_get_row_int(TotalTurfs, 7);
        TurfInfo[TotalTurfs][tNrSize] = cache_get_row_int(TotalTurfs, 8);
    }
    printf("%d turfs loaded",TotalTurfs);
    return 1;
}

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Link to comment
Share on other sites

  • 0
stock LoadTurfs()
{
    new tempp[124], TotalTurfs;
    cache_get_data(rows, fields);
    for(TotalTurfs = 0; TotalTurfs < rows; TotalTurfs++)
    {
        TurfInfo[TotalTurfs][tID] = cache_get_row_int(TotalTurfs, 0);
        TurfInfo[TotalTurfs][tOwned] = cache_get_row_int(TotalTurfs, 1);
        TurfInfo[TotalTurfs][tTime] = cache_get_row_int(TotalTurfs, 2);
        TurfInfo[TotalTurfs][tMinX] = cache_get_row_float(TotalTurfs, 3);
        TurfInfo[TotalTurfs][tMinY] = cache_get_row_float(TotalTurfs, 4);
        TurfInfo[TotalTurfs][tMaxX] = cache_get_row_float(TotalTurfs, 5);
        TurfInfo[TotalTurfs][tMaxY] = cache_get_row_float(TotalTurfs, 6);
        TurfInfo[TotalTurfs][tNr] = cache_get_row_int(TotalTurfs, 7);
        TurfInfo[TotalTurfs][tNrSize] = cache_get_row_int(TotalTurfs, 8);
    }
    printf("%d turfs loaded",TotalTurfs);
}
public OnGameModeInit( )
{
    LoadTurfs();
    return 1;
}

Incearca asa xD

242086.png

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.