Help me please , dialog
#1

Tks for you.
Reply
#2

You cannot switch listitem twice, you'll have to create a new dialog for your case 1. And then in that dialog you have to use, switch(listitem).
Reply
#3

Quote:

if(dialogid == LAYBANGDANNEWBIE)
{
if(response)
{
switch(listitem)
{
case 0: // 9mm
{
new weapon, ammosd;
GetPlayerWeaponData(playerid, 2, weapon, ammosd);
if(weapon == 31)
}
if(PlayerInfo[playerid][pMats] > 100)
{
PlayerInfo[playerid][pMats] -= 100;
GivePlayerAmmoEx(playerid, weapon, 50);
SetPlayerArmedWeapon(playerid, weapon);
SendClientMessageEx(playerid, COLOR_YELLOW, "Ban da che tao 1 bang dan cho khau sung M4 cua ban.");
}
else
{
SendClientMessageEx(playerid, COLOR_YELLOW, "Ban khong du vat lieu.");
}
else
{
SendClientMessageEx(playerid, COLOR_YELLOW, "Ban khong co vu khi , nen khong the che tao dan");
}
}

Like this one, huh
Reply
#4

PHP код:
if(dialogid == LAYBANGDANNEWBIE)
{
    if(
response)
    {
        switch(
listitem)
        {
            case 
0// 9mm
            
{
                new 
weaponammosd;
                
GetPlayerWeaponData(playerid2weaponammosd);
                if(
weapon == 31)
                { 
// error here, your bracket is close "}"
                    
if(PlayerInfo[playerid][pMats] > 100)
                    {
                        
PlayerInfo[playerid][pMats] -= 100;
                        
GivePlayerAmmoEx(playeridweapon50);
                        
SetPlayerArmedWeapon(playeridweapon);
                        
SendClientMessageEx(playeridCOLOR_YELLOW"Ban da che tao 1 bang dan cho khau sung M4 cua ban.");
                    }
                    else
                    {
                        
SendClientMessageEx(playeridCOLOR_YELLOW"Ban khong du vat lieu.");
                    }
                else
                {
                    
SendClientMessageEx(playeridCOLOR_YELLOW"Ban khong co vu khi , nen khong the che tao dan");
                }
            } 
Reply
#5

Tks you , let me try
I just try to do, amateurs
Reply
#6

Quote:

./includes/thunghiem.pwn(45149) : warning 216: nested comment
./includes/thunghiem.pwn(45180) : warning 216: nested comment
./includes/thunghiem.pwn(83256) : warning 217: loose indentation
./includes/thunghiem.pwn(83270) : warning 217: loose indentation
./includes/thunghiem.pwn(103019) : warning 217: loose indentation
./includes/thunghiem.pwn(103020) : warning 217: loose indentation
./includes/thunghiem.pwn(108855) : warning 217: loose indentation
./includes/thunghiem.pwn(108856) : warning 217: loose indentation
./includes/thunghiem.pwn(108862) : warning 217: loose indentation
./includes/thunghiem.pwn(108864) : warning 217: loose indentation
./includes/thunghiem.pwn(108885) : warning 217: loose indentation
./includes/thunghiem.pwn(108886) : warning 217: loose indentation
./includes/thunghiem.pwn(10888 : warning 217: loose indentation
./includes/thunghiem.pwn(108905) : warning 202: number of arguments does not match definition
./includes/thunghiem.pwn(126246) : warning 217: loose indentation
./includes/thunghiem.pwn(126246) : error 029: invalid expression, assumed zero
./includes/thunghiem.pwn(126265) : warning 217: loose indentation
E:\Thu nghiem Lv\NGRP.pwn(25) : error 002: only a single statement (or expression) can follow each "case"
E:\Thu nghiem Lv\NGRP.pwn(25) : error 029: invalid expression, assumed zero
E:\Thu nghiem Lv\NGRP.pwn(27) : warning 217: loose indentation
E:\Thu nghiem Lv\NGRP.pwn(27) : error 029: invalid expression, assumed zero
E:\Thu nghiem Lv\NGRP.pwn(27) : error 004: function "S@@_OnGameModeInit" is not implemented
E:\Thu nghiem Lv\NGRP.pwn(34) : warning 225: unreachable code
E:\Thu nghiem Lv\NGRP.pwn(34) : error 029: invalid expression, assumed zero
E:\Thu nghiem Lv\NGRP.pwn(34) : error 004: function "S@@_OnGameModeExit" is not implemented
E:\Thu nghiem Lv\NGRP.pwn(39) : error 030: compound statement not closed at the end of file (started at line 126225)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


8 Errors.

I do not know what bugs
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)