I need help to compile this Dialog !
#1

Код:
if(dialogid == PIZZASTACKMENU)
	{
	    new float:health;
	    if(response)
	    {
	        if(listitem == 0)
	        {
	            if(GetPlayerCash(playerid) >= 25) return SendClientMessage(playerid, COLOR_WHITE, " You don't have enough money to do this.");
	            {
	            	GetPlayerHealth(playerid, health);
	                {
					if(health <= 80);
					{
	    				SetPlayerHealth(playerid, +20);
					}
					else
					{
	    			SetPlayerHealth(playerid, 100);
				    }
					    GivePlayerCash(playerid, -25);
						ApplyAnimation(playerid, "FOOD", "EAT_Pizza",4.1,0,1,1,0,0);
					}
				}
				if(listitem == 1)
				{
				    if(GetPlayerCash(playerid) >=35) return SendClientMessage(playerid, COLOR_WHITE, " You don't have enough money to do this.");
				    {
				        GetPlayerHealth(playerid, health);
				        {
				        if(health <= 70);
						{
						    SetPlayerHealth(playerid, +30);
						}
						else
						{
						SetPlayerHealth(Playerid, 100);
						}
						    GivePlayerCash(playerid, -35);
                            ApplyAnimation(playerid, "FOOD", "EAT_Pizza",4.1,0,1,1,0,0);
						}
					}
					if(listitem == 2)
					{
	    				if(GetPlayerCash(playerid) >=35) return SendClientMessage(playerid, COLOR_WHITE, " You don't have enough money to do this.");
					    {
					        GetPlayerHealth(playerid, health);
					        {
					        if(health <=70);
					        {
					            SetPlayerHealth(playerid, +30);
							}
							else
							{
							SetPlayerHealth(playerid, 100);
							}
							    GivePlayerCash(playerid, -45);
							    ApplyAnimation(playerid, "FOOD", "EAT_Pizza",4.1,0,1,1,0,0);
							}
						}
					}

Код:
C:\Users\NoConviction\Desktop\FGRP\gamemodes\HRP_9.0.pwn(53693) : warning 213: tag mismatch
C:\Users\NoConviction\Desktop\FGRP\gamemodes\HRP_9.0.pwn(53695) : warning 213: tag mismatch
C:\Users\NoConviction\Desktop\FGRP\gamemodes\HRP_9.0.pwn(53695) : error 036: empty statement
C:\Users\NoConviction\Desktop\FGRP\gamemodes\HRP_9.0.pwn(53697) : error 029: invalid expression, assumed zero
C:\Users\NoConviction\Desktop\FGRP\gamemodes\HRP_9.0.pwn(53697) : warning 215: expression has no effect
C:\Users\NoConviction\Desktop\FGRP\gamemodes\HRP_9.0.pwn(53697) : error 001: expected token: ";", but found ")"
C:\Users\NoConviction\Desktop\FGRP\gamemodes\HRP_9.0.pwn(53697) : error 029: invalid expression, assumed zero
C:\Users\NoConviction\Desktop\FGRP\gamemodes\HRP_9.0.pwn(53697) : fatal error 107: too many error messages on one line

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


5 Errors.

PS: Error lines at the listitem == 0 53697 GetPlayerHealth(playerid, health); 53695 if(health <=80); and 53697 SetPlayerHealth(playerid, +20);
Reply
#2

EDIT: Ops sorry for spamming, my browser was unable to connect to forums database.
Reply
#3

pawn Код:
if(dialogid == PIZZASTACKMENU)
{
    new Float:health;
    if(response)
    {
        if(listitem == 0)
        {
            if(GetPlayerCash(playerid) >= 25) return SendClientMessage(playerid, COLOR_WHITE, " You don't have enough money to do this.");
            GetPlayerHealth(playerid, health);
            if(health <= 80)
            {
                SetPlayerHealth(playerid, health+20);
            }
            else
            {
            SetPlayerHealth(playerid, 100);
            }
            GivePlayerCash(playerid, -25);
            ApplyAnimation(playerid, "FOOD", "EAT_Pizza",4.1,0,1,1,0,0);
        }
        if(listitem == 1)
        {
            if(GetPlayerCash(playerid) >=35) return SendClientMessage(playerid, COLOR_WHITE, " You don't have enough money to do this.");
            GetPlayerHealth(playerid, health);
            if(health <= 70)
            {
                SetPlayerHealth(playerid, health+30);
            }
            else
            {
                SetPlayerHealth(Playerid, 100);
            }
            GivePlayerCash(playerid, -35);
            ApplyAnimation(playerid, "FOOD", "EAT_Pizza",4.1,0,1,1,0,0);
        }
        if(listitem == 2)
        {
            if(GetPlayerCash(playerid) >=35) return SendClientMessage(playerid, COLOR_WHITE, " You don't have enough money to do this.");
            GetPlayerHealth(playerid, health);

            if(health <=70)
            {
                SetPlayerHealth(playerid, health+30);
            }
            else
            {
                SetPlayerHealth(playerid, 100);
            }
                GivePlayerCash(playerid, -45);
                ApplyAnimation(playerid, "FOOD", "EAT_Pizza",4.1,0,1,1,0,0);
        }

    }
}
Reply
#4

Код:
C:\Users\NoConviction\Desktop\FGRP\gamemodes\HRP_9.0.pwn(53693) : error 036: empty statement
C:\Users\NoConviction\Desktop\FGRP\gamemodes\HRP_9.0.pwn(53697) : error 029: invalid expression, assumed zero
C:\Users\NoConviction\Desktop\FGRP\gamemodes\HRP_9.0.pwn(53708) : error 036: empty statement
C:\Users\NoConviction\Desktop\FGRP\gamemodes\HRP_9.0.pwn(53712) : error 029: invalid expression, assumed zero
C:\Users\NoConviction\Desktop\FGRP\gamemodes\HRP_9.0.pwn(53724) : error 036: empty statement
C:\Users\NoConviction\Desktop\FGRP\gamemodes\HRP_9.0.pwn(53728) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors
.

Have this Errors at if(health <= 80) and on the others if(health)

Ps: Sorry Wrap [CODE] tags don't work i don't know why ..
Reply
#5

Quote:
Originally Posted by RotAway
Посмотреть сообщение
C:\Users\NoConviction\Desktop\FGRP\gamemodes\HRP_9 .0.pwn(53693) : error 036: empty statement
C:\Users\NoConviction\Desktop\FGRP\gamemodes\HRP_9 .0.pwn(53697) : error 029: invalid expression, assumed zero
C:\Users\NoConviction\Desktop\FGRP\gamemodes\HRP_9 .0.pwn(5370 : error 036: empty statement
C:\Users\NoConviction\Desktop\FGRP\gamemodes\HRP_9 .0.pwn(53712) : error 029: invalid expression, assumed zero
C:\Users\NoConviction\Desktop\FGRP\gamemodes\HRP_9 .0.pwn(53724) : error 036: empty statement
C:\Users\NoConviction\Desktop\FGRP\gamemodes\HRP_9 .0.pwn(5372 : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Errors.Have this Errors at if(health <= 80) and on the others if(health)
I edited my post more than once, just was fixing some mistakes every minute, just try the latest code again, and it compiles fine for me.

Also, use [ pawn ] code here [ /pawn ] without the spaces, to add some codes.
Reply
#6

Alrigh, FIXED Thank you very much +1 rep for you of course
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)