warning 213: tag mismatch & Created pickup don't show
#1

Hi all!

I got 2 problem with my script. When i use floatstr() in my LoadBizz function. i got the warning warning 213: tag mismatch.

Also, When i create a pickup in my CreateBizz function, it it created (The function return true) But i don't see it in the game... I checked the XYZ and its all okay.

How i can fix those problem?

Thanks
Greatman
pawn Код:
public LoadBizz()
{
    new arrCoords[15][64];
    new strFromFile2[256];
    new File: file = fopen("bizz.cfg", io_read);
    if (file)
    {
        new idx;
        while (idx < sizeof(gBusinessInfo))
        {

            fread(file, strFromFile2);
            split(strFromFile2, arrCoords, ',');
            gBusinessInfo[idx][BUSINESS_OWNED] = strval(arrCoords[0]);
            strmid(gBusinessInfo[idx][BUSINESS_OWNER], arrCoords[1], 0, strlen(arrCoords[1]), 255);
            strmid(gBusinessInfo[idx][BUSINESS_NAME], arrCoords[2], 0, strlen(arrCoords[2]), 255);
            gBusinessInfo[idx][BUSINESS_ICONX] = floatstr(arrCoords[3]);
            gBusinessInfo[idx][BUSINESS_ICONY] = floatstr(arrCoords[4]);
            gBusinessInfo[idx][BUSINESS_ICONZ] = floatstr(arrCoords[5]);
            gBusinessInfo[idx][BUSINESS_INSIDEX] = floatstr(arrCoords[6]);
            gBusinessInfo[idx][BUSINESS_INSIDEY] = floatstr(arrCoords[7]);
            gBusinessInfo[idx][BUSINESS_INSIDEZ] = floatstr(arrCoords[8]);
            gBusinessInfo[idx][BUSINESS_VWINTERIOR] = idx;
            gBusinessInfo[idx][BUSINESS_INTERIOR] = strval(arrCoords[9]);
            gBusinessInfo[idx][BUSINESS_BUYLEVEL] = strval(arrCoords[10]);
            gBusinessInfo[idx][BUSINESS_BUYPRICE] = strval(arrCoords[11]);
            gBusinessInfo[idx][BUSINESS_ENTRYFEE] = strval(arrCoords[12]);
            gBusinessInfo[idx][BUSINESS_LOCK] = strval(arrCoords[13]);
            gBusinessInfo[idx][BUSINESS_BANK] = strval(arrCoords[14]);
            printf("Business ID:%d Owner:%s Name:%s Entryfee:%d Interior:%d.\n",
            idx,
            gBusinessInfo[idx][BUSINESS_OWNER],
            gBusinessInfo[idx][BUSINESS_NAME],
            gBusinessInfo[idx][BUSINESS_ENTRYFEE],
            gBusinessInfo[idx][BUSINESS_INTERIOR]);
            idx++;
        }
        fclose(file);
    }
    return 1;
}
public CreateBizz()
{
    new idx;
    while (idx < sizeof(gBusinessInfo))
    {
      printf("%f %f %f",gBusinessInfo[idx][BUSINESS_ICONX],gBusinessInfo[idx][BUSINESS_ICONY],gBusinessInfo[idx][BUSINESS_ICONZ]);
      gBusinessInfo[idx][BUSINESS_ICONID] = AddStaticPickup(1272,1,gBusinessInfo[idx][BUSINESS_ICONX],gBusinessInfo[idx][BUSINESS_ICONY],gBusinessInfo[idx][BUSINESS_ICONZ],-1);
        printf("%i",gBusinessInfo[idx][BUSINESS_ICONID]);
        idx++;
    }
    return 1;
}
Reply
#2

happened to me too, dunno how to fix for sure, but i just destroyed and re-created the pickups, and they appeared.

EDIT: i didnt read your code, too lazy

For the Tag Mistmatch means you got wrong the first parameter of a function (see line) .
Reply
#3

https://sampwiki.blast.hk/wiki/Scripting...s_Old#floatstr
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)