SA-MP Forums Archive
[HELP] Whats wrong with that dialog? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] Whats wrong with that dialog? (/showthread.php?tid=540539)



[HELP] Whats wrong with that dialog? - darkokan - 05.10.2014

Код:
public OnPlayerEnterCheckpoint(playerid)
{

	new string[256];

	new Houseid = PlayerInfo[playerid][pCheckpoint];


	switch (HouseInfo[Houseid][h_cpbustype])
	{
	
			case BUS_TYPE_SEXSHOP:
			{
			if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
			{
				ShowPlayerDialog(playerid, DIALOG_SEXSHOP, DIALOG_STYLE_LIST, "Menu", "Dildo\nCondom", "Buy", "Cancel");
			}
			}
When I type these all of the codes above gives error. Whats the problem?


Re: [HELP] Whats wrong with that dialog? - YanLanger - 05.10.2014

Post the errors.


Re: [HELP] Whats wrong with that dialog? - darkokan - 05.10.2014

Quote:
Originally Posted by YanLanger
Посмотреть сообщение
Post the errors.
Now I made change a little bit then no more errors on above lines but these:

(27712) : error 029: invalid expression, assumed zero
(27712) : warning 215: expression has no effect
(27712) : error 001: expected token: ";", but found ")"
(27712) : error 029: invalid expression, assumed zero

Код:
public OnPlayerEnterCheckpoint(playerid)
{

	new string[256];

	//if(PlayerInfo[playerid][pMission] <= MISSION_TYPE_CASINO_HOLDUP)
	//{

	new Houseid = PlayerInfo[playerid][pCheckpoint];


	switch (HouseInfo[Houseid][h_cpbustype])
	{
	
		case BUS_TYPE_SEXSHOP:
		{
		if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
		{
(27712)	               ShowPlayerDialog(playerid, DIALOG_SEXSHOP, DIALOG_STYLE_LIST, "Menu", "Dildo\nCondom", "Buy", "Cancel");
		}
		}
	
	}
	return 1;
}



Re: [HELP] Whats wrong with that dialog? - YanLanger - 05.10.2014

Try this
PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
    new 
string[256];
    
//if(PlayerInfo[playerid][pMission] <= MISSION_TYPE_CASINO_HOLDUP)
    //{
    
new Houseid PlayerInfo[playerid][pCheckpoint];
    switch (
HouseInfo[Houseid][h_cpbustype])
    {
    
        case 
BUS_TYPE_SEXSHOP:
        {
        if (
GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
        {
(
27712)                   ShowPlayerDialog(playeridDIALOG_SEXSHOPDIALOG_STYLE_LIST"Menu""Dildo\nCondom""Buy""Cancel");
        }
    
    }
    return 
1;

If it's not wroking that this
PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
    new 
string[256];
    
//if(PlayerInfo[playerid][pMission] <= MISSION_TYPE_CASINO_HOLDUP)
    //{
    
new Houseid PlayerInfo[playerid][pCheckpoint];
    switch (
HouseInfo[Houseid][h_cpbustype])
    {
    
        case 
BUS_TYPE_SEXSHOP:
        {
        if (
GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
        {
             
ShowPlayerDialog(playeridDIALOG_SEXSHOPDIALOG_STYLE_LIST"Menu""Dildo\nCondom""Buy""Cancel");
        }
        return 
1;
        
    }
    return 
1;




Re: [HELP] Whats wrong with that dialog? - YanLanger - 05.10.2014

If you get new errors tell me.

And did 1 of these worked ?


Re: [HELP] Whats wrong with that dialog? - darkokan - 05.10.2014

Quote:
Originally Posted by YanLanger
Посмотреть сообщение
Try this
PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
    new 
string[256];
    
//if(PlayerInfo[playerid][pMission] <= MISSION_TYPE_CASINO_HOLDUP)
    //{
    
new Houseid PlayerInfo[playerid][pCheckpoint];
    switch (
HouseInfo[Houseid][h_cpbustype])
    {
    
        case 
BUS_TYPE_SEXSHOP:
        {
        if (
GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
        {
(
27712)                   ShowPlayerDialog(playeridDIALOG_SEXSHOPDIALOG_STYLE_LIST"Menu""Dildo\nCondom""Buy""Cancel");
        }
    
    }
    return 
1;

If it's not wroking that this
PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
    new 
string[256];
    
//if(PlayerInfo[playerid][pMission] <= MISSION_TYPE_CASINO_HOLDUP)
    //{
    
new Houseid PlayerInfo[playerid][pCheckpoint];
    switch (
HouseInfo[Houseid][h_cpbustype])
    {
    
        case 
BUS_TYPE_SEXSHOP:
        {
        if (
GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
        {
             
ShowPlayerDialog(playeridDIALOG_SEXSHOPDIALOG_STYLE_LIST"Menu""Dildo\nCondom""Buy""Cancel");
        }
        return 
1;
        
    }
    return 
1;

same


Re: [HELP] Whats wrong with that dialog? - YanLanger - 05.10.2014

Hmm try this

PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
    new 
string[256];
    
//if(PlayerInfo[playerid][pMission] <= MISSION_TYPE_CASINO_HOLDUP)
    //{
    
new Houseid PlayerInfo[playerid][pCheckpoint];
    switch (
HouseInfo[Houseid][h_cpbustype])
    {
    
        case 
BUS_TYPE_SEXSHOP:
        {
        if (
GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
        {
                   
ShowPlayerDialog(playeridDIALOG_SEXSHOPDIALOG_STYLE_LIST"Menu""Dildo\r\nCondom""Buy""Cancel");
        }
        }
    
    }
    return 
1;




Re: [HELP] Whats wrong with that dialog? - darkokan - 05.10.2014

Quote:
Originally Posted by YanLanger
Посмотреть сообщение
Hmm try this

PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
    new 
string[256];
    
//if(PlayerInfo[playerid][pMission] <= MISSION_TYPE_CASINO_HOLDUP)
    //{
    
new Houseid PlayerInfo[playerid][pCheckpoint];
    switch (
HouseInfo[Houseid][h_cpbustype])
    {
    
        case 
BUS_TYPE_SEXSHOP:
        {
        if (
GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
        {
                   
ShowPlayerDialog(playeridDIALOG_SEXSHOPDIALOG_STYLE_LIST"Menu""Dildo\r\nCondom""Buy""Cancel");
        }
        }
    
    }
    return 
1;

I'm gonna cry


Re: [HELP] Whats wrong with that dialog? - YanLanger - 05.10.2014

Hmmm just a sec let me think.. try this if it's ain't workin that idk what's da prob
PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
    new 
string[256];
    
//if(PlayerInfo[playerid][pMission] <= MISSION_TYPE_CASINO_HOLDUP)
    //{
    
new Houseid PlayerInfo[playerid][pCheckpoint];
    switch (
HouseInfo[Houseid][h_cpbustype])
    {
    
        case 
BUS_TYPE_SEXSHOP:
        {
        if (
GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
        {
                   
ShowPlayerDialog(playeridDIALOG_SEXSHOPDIALOG_STYLE_LIST"Menu""Dildo\nCondom""Buy""Cancel");
        }
    
    }
    return 
1;




Re: [HELP] Whats wrong with that dialog? - darkokan - 05.10.2014

Quote:
Originally Posted by YanLanger
Посмотреть сообщение
Hmmm just a sec let me think.. try this if it's ain't workin that idk what's da prob
PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
    new 
string[256];
    
//if(PlayerInfo[playerid][pMission] <= MISSION_TYPE_CASINO_HOLDUP)
    //{
    
new Houseid PlayerInfo[playerid][pCheckpoint];
    switch (
HouseInfo[Houseid][h_cpbustype])
    {
    
        case 
BUS_TYPE_SEXSHOP:
        {
        if (
GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
        {
                   
ShowPlayerDialog(playeridDIALOG_SEXSHOPDIALOG_STYLE_LIST"Menu""Dildo\nCondom""Buy""Cancel");
        }
    
    }
    return 
1;

Still gives error :/ thank you though