Need Help!
#1

Код:
C:\Users\User\Desktop\samp project\gamemodes\tes.pwn(40488) : error 017: undefined symbol "idx"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
1 Error.
PHP код:
else if(!strcmp(params"price"true5))
    {
        if(
sscanf(params"s[32]ii"paramsbizidinput)) return SendClientMessage(playeridCOLOR_WHITE"USAGE: /bedit price [bizid] [price]");
        if(!
BizInfo[bizid][bType]) return SendClientMessage(playeridCOLOR_GREY"Invalid business id.");
        if(
strcmp("Tidak ada"BizInfo[bizid][bOwner])) return SendClientMessage(playeridCOLOR_GREY"You can't edit the price of owned businesses.");
        
BizInfo[bizid][bPrice] = input;
        
format(stringsizeof(string), "ID: %d\n%s\n%s\nOwner: %s\nStatus: For Sale\nPrice: $%d"idxRBT(idx), BizInfo[idx][bMessage], BizInfo[idx][bOwner], BizInfo[bizid][bPrice]);
        
UpdateDynamic3DTextLabelText(BizInfo[bizid][bText], COLOR_WHITEstring);
        
format(stringsizeof(string), "AdmWarn: %s has set business ID %d's price to $%d."GetPlayerNameEx(playerid), bizidinput);
        
ABroadCast(COLOR_YELLOWstring4);
        
Log("logs/business.log"string);
    } 
Reply
#2

You need to define the idx

add this under the includes

pawn Код:
new idx;
Reply
#3

pawn Код:
else if(!strcmp(params, "price", true, 5))
    {
        if(sscanf(params, "s[32]ii", params, bizid, input)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /bedit price [bizid] [price]");
        if(!BizInfo[bizid][bType]) return SendClientMessage(playerid, COLOR_GREY, "Invalid business id.");
        if(strcmp("Tidak ada", BizInfo[bizid][bOwner])) return SendClientMessage(playerid, COLOR_GREY, "You can't edit the price of owned businesses.");
        new idx;//here you go.
        BizInfo[bizid][bPrice] = input;
        format(string, sizeof(string), "ID: %d\n%s\n%s\nOwner: %s\nStatus: For Sale\nPrice: $%d", idx, RBT(idx), BizInfo[idx][bMessage], BizInfo[idx][bOwner], BizInfo[bizid][bPrice]);
        UpdateDynamic3DTextLabelText(BizInfo[bizid][bText], COLOR_WHITE, string);
        format(string, sizeof(string), "AdmWarn: %s has set business ID %d's price to $%d.", GetPlayerNameEx(playerid), bizid, input);
        ABroadCast(COLOR_YELLOW, string, 4);
        Log("logs/business.log", string);
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)