Error..
#1

Errors:
Code:
error 079: inconsistent return types (array & non-array)
Codes:
Code:
if(dialogid == D_VLIST)
{
if(response)
{
  		    if(listitem == 0)
			{

			if(PlayerInfo[playerid][dRank] >= 1)
			{
			new str[1200];
    strcat(str, "{084B8A}/vheal ,/varmour ,/vheli ,/vskin ,/vcar\n");
	strcat(str, "/fr ,/v ,/vtime ,/vweather ,/vweap ,/vnos ,/vboat\n");
    ShowPlayerDialog(playerid, 5250, DIALOG_STYLE_MSGBOX, "{8A0868}.:::::::{FFFFFF}VIP 1{8A0868}:::::::.", str, "ok", "");
			}

			}
			  		    if(listitem == 1)
			{

			if(PlayerInfo[playerid][dRank] >= 2)
            {
			new str[1200];
    strcat(str, "{084B8A}/vheal ,/varmour ,/vheli ,/vskin ,/vcar ,/vbike\n");
	strcat(str, "/fr ,/v ,/vtime ,/vweather ,/vweap ,/vnos\n");
	strcat(str, "/vcolor ,/vson ,/vsoff ,/vboat ,/armedvon ,/armedvoff\n");

          ShowPlayerDialog(playerid, 5150, DIALOG_STYLE_MSGBOX, "{8A0868}.:::::::{FFFFFF}VIP 2{8A0868}:::::::.", str, "ok", "");
            }

			}
			  		    if(listitem == 2)
			{

			if(PlayerInfo[playerid][dRank] >= 3)
            {
			new str[1200];
    strcat(str, "{0080FF}/vheal ,/varmour ,/vheli ,/vskin ,/vcar ,/vbike\n");
	strcat(str, "/fr ,/v ,/vtime ,/vweather ,/vweap ,/vnos ,/vfix ,/vBoost\n");
	strcat(str, "/vcolor ,/vammo ,/vson ,/vsoff ,/vboat ,/armedvon ,/armedvoff\n");


          ShowPlayerDialog(playerid, 5050, DIALOG_STYLE_MSGBOX, "{8A0868}.:::::::{FFFFFF}VIP 3{8A0868}:::::::.", str, "ok", "");
			}

			}
}
return 1;
}
How to fix??
Reply
#2

I just read the code and i thought: What the hell is happening to my life

pawn Code:
CMD:vipcmds(playerid, params[])
{
    new info[250];
   
    switch (PlayerInfo[playerid][dRank])
    {
        case 1:
    {
        strcat(info, "Vip Commands (Level 1):\n\n");
        strcat(info, "{084B8A}/vheal ,/varmour ,/vheli ,/vskin ,/vcar\n");
        strcat(info, "/fr ,/v ,/vtime ,/vweather ,/vweap ,/vnos ,/vboat\n");
    }
   
        case 2:
    {
        strcat(info, "Vip Commands (Level 2):\n\n");
        strcat(info, "{084B8A}/vheal ,/varmour ,/vheli ,/vskin ,/vcar ,/vbike\n");
        strcat(info, "/fr ,/v ,/vtime ,/vweather ,/vweap ,/vnos\n");
        strcat(info, "/vcolor ,/vson ,/vsoff ,/vboat ,/armedvon ,/armedvoff\n");
    }
   
        case 3:
    {
        strcat(info, "Vip Commands (Level 3):\n\n");
        strcat(info, "{0080FF}/vheal ,/varmour ,/vheli ,/vskin ,/vcar ,/vbike\n");
        strcat(info, "/fr ,/v ,/vtime ,/vweather ,/vweap ,/vnos ,/vfix ,/vBoost\n");
        strcat(info, "/vcolor ,/vammo ,/vson ,/vsoff ,/vboat ,/armedvon ,/armedvoff\n");
    }
   
    }
   
    ShowPlayerDialog(playerid, 5050, DIALOG_STYLE_MSGBOX, "VIP Commands", info, "Close", "");
    return 1;
}
Reply
#3

Quote:
Originally Posted by KinderClans
View Post
I just read the code and i thought: What the hell is happening to my life

pawn Code:
CMD:vipcmds(playerid, params[])
{
    new info[250];
   
    switch (PlayerInfo[playerid][dRank])
    {
        case 1:
    {
        strcat(info, "Vip Commands (Level 1):\n\n");
        strcat(info, "{084B8A}/vheal ,/varmour ,/vheli ,/vskin ,/vcar\n");
        strcat(info, "/fr ,/v ,/vtime ,/vweather ,/vweap ,/vnos ,/vboat\n");
    }
   
        case 2:
    {
        strcat(info, "Vip Commands (Level 2):\n\n");
        strcat(info, "{084B8A}/vheal ,/varmour ,/vheli ,/vskin ,/vcar ,/vbike\n");
        strcat(info, "/fr ,/v ,/vtime ,/vweather ,/vweap ,/vnos\n");
        strcat(info, "/vcolor ,/vson ,/vsoff ,/vboat ,/armedvon ,/armedvoff\n");
    }
   
        case 3:
    {
        strcat(info, "Vip Commands (Level 3):\n\n");
        strcat(info, "{0080FF}/vheal ,/varmour ,/vheli ,/vskin ,/vcar ,/vbike\n");
        strcat(info, "/fr ,/v ,/vtime ,/vweather ,/vweap ,/vnos ,/vfix ,/vBoost\n");
        strcat(info, "/vcolor ,/vammo ,/vson ,/vsoff ,/vboat ,/armedvon ,/armedvoff\n");
    }
   
    }
   
    ShowPlayerDialog(playerid, 5050, DIALOG_STYLE_MSGBOX, "VIP Commands", info, "Close", "");
    return 1;
}
thanks but all my codes in OnDialogResponse Bugged and give error:
Code:
(3722) : error 079: inconsistent return types (array & non-array)
(3771) : error 079: inconsistent return types (array & non-array)
(3785) : error 079: inconsistent return types (array & non-array)
(3797) : error 079: inconsistent return types (array & non-array)
(3799) : error 079: inconsistent return types (array & non-array)
(3857) : error 079: inconsistent return types (array & non-array)
(3889) : error 079: inconsistent return types (array & non-array)
(3910) : error 079: inconsistent return types (array & non-array)
(3957) : error 079: inconsistent return types (array & non-array)
(4007) : error 079: inconsistent return types (array & non-array)
(4034) : error 079: inconsistent return types (array & non-array)
(4056) : error 079: inconsistent return types (array & non-array)
(4080) : error 079: inconsistent return types (array & non-array)
(4090) : error 079: inconsistent return types (array & non-array)
(4104) : error 079: inconsistent return types (array & non-array)
(4114) : error 079: inconsistent return types (array & non-array)
(4115) : error 079: inconsistent return types (array & non-array)
(4116) : error 079: inconsistent return types (array & non-array)
(4131) : error 079: inconsistent return types (array & non-array)
(4137) : error 079: inconsistent return types (array & non-array)
(4138) : error 079: inconsistent return types (array & non-array)
(4139) : error 079: inconsistent return types (array & non-array)
(4156) : error 079: inconsistent return types (array & non-array)
(4162) : error 079: inconsistent return types (array & non-array)
(4163) : error 079: inconsistent return types (array & non-array)
(4164) : error 079: inconsistent return types (array & non-array)

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
Reply
#4

Which line is involved? Show us the code
Reply
#5

^ Exactly. Show us whole OnDialogResponse.
Reply
#6

Please search before posting

https://sampforum.blast.hk/showthread.php?tid=269410

third post by Vince

also if you think you dont understand what to do just post the full cod of error lines and dialogrespon then we will try to fix that and give you fixed code Tnx
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)