open.mp forum
[Pawn] Grow Canabis Pawno Error - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10)
--- Thread: [Pawn] Grow Canabis Pawno Error (/showthread.php?tid=2860)



Grow Canabis Pawno Error - nhocngu24 - 2024-08-13

error 012: invalid function call, not a valid address
 warning 215: expression has no effect
 error 001: expected token: ";", but found ")"
 error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line

4 Errors.


Quote:p, li { white-space: pre-wrap; }
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
    if (dialogid == DIALOG_CANNABIS) {
        if (response == DIALOG_RESPONSE_OK) { // Kiểm tra nếu phản hồi là OK
            switch (listitem) {
                case 0: // Đặt chậu
                {
                        PlacePlantPot(playerid); ( where error)
                    } else {
                        SendClientMessage(playerid, COLOR_RED, "Không thể đặt chậu.");
                    }
                }

                case 1: // Gieo hạt
                {
                        PlantSeeds(playerid);
                    } else {
                        SendClientMessage(playerid, COLOR_RED, "Không thể gieo hạt.");
                    }
                }

                case 2: // Tưới nước cho cây
                {
                        WaterPlants(playerid);
                    } else {
                        SendClientMessage(playerid, COLOR_RED, "Không thể tưới nước cho cây.");
                    }
                }

                case 3: // Phun thuốc trừ sâu
                {
                        ApplyPesticide(playerid);
                    } else {
                        SendClientMessage(playerid, COLOR_RED, "Không thể phun thuốc trừ sâu.");
                    }
                }

                case 4: // Bón phân
                {
                        ApplyFertilizer(playerid);
                    } else {
                        SendClientMessage(playerid, COLOR_RED, "Không thể bón phân.");
                    }
                }

                case 5: // Thu hoạch
                {
                        HarvestCannabis(playerid);
                    } else {
                        SendClientMessage(playerid, COLOR_RED, "Không thể thu hoạch.");
                    }
                }

                case 6: // Đóng
                {
                    // Đóng hộp thoại hoặc thực hiện bất kỳ hành động nào khác nếu cần
                }

                {
                    SendClientMessage(playerid, COLOR_RED, "Lựa chọn không hợp lệ.");
                }
            }
        } else if (response == DIALOG_RESPONSE_CANCEL) { // Kiểm tra nếu phản hồi là Hủy bỏ
            SendClientMessage(playerid, COLOR_RED, "Hộp thoại đã bị hủy.");
        }
    }
    return 1; // Trả về 1 để chỉ ra rằng phản hồi đã được xử lý
}



RE: Grow Canabis Pawno Error - nhocngu24 - 2024-08-13

help me job canabis