errors
#1

Код:
I:\GTA San Andreas\RRP\gamemodes\r-rp.pwn(322) : error 017: undefined symbol "newkeys"
I:\GTA San Andreas\RRP\gamemodes\r-rp.pwn(707) : error 002: only a single statement (or expression) can follow each "case"
I:\GTA San Andreas\RRP\gamemodes\r-rp.pwn(711) : error 002: only a single statement (or expression) can follow each "case"
I:\GTA San Andreas\RRP\gamemodes\r-rp.pwn(711 -- 712) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
In these lines :
Код:
 if(newkeys == KEY_SECONDARY_ATTACK)
(322)

Код:
	case DIALOG_CARS+5://For lock
		   {
		   switch(listitem)
		   {
		   	case 0: {
            if(pInfo[playerid][Veh1] != 9999) { C_Data[pInfo[playerid][Veh1]][Lock] = 1; CheckCar(pInfo[playerid][Veh1]); } }
		   	case 1: {
            if(pInfo[playerid][Veh2] != 9999) { C_Data[pInfo[playerid][Veh2]][Lock] = 1; CheckCar(pInfo[playerid][Veh2]); } }
		   	case 2: {
            if(pInfo[playerid][Veh3] != 9999) { C_Data[pInfo[playerid][Veh3]][Lock] = 1; CheckCar(pInfo[playerid][Veh3]); } } // 707
			return 1;
}
Код:
	if(dialogid == 1)
	{ // 711
	    if(!response) return Kick(playerid); // 712
		if(response)
Reply
#2

First, change this:

if(newkeys == KEY_SECONDARY_ATTACK)

to this:

if(newkeys & KEY_SECONDARY_ATTACK)
Reply
#3

Open Pawno(folder)>Pawno.exe>Open>YourGamemode.Then compile it.If still shows that PM me.
Reply
#4

still same errors
Reply
#5

pawn Код:
if(InsertInfoHere == DIALOG_CARS+5) //For lock
{
    switch(listitem)
    {
    case 0:
    {
        if(pInfo[playerid][Veh1] != 9999)
        {
            C_Data[pInfo[playerid][Veh1]][Lock] = 1;
            CheckCar(pInfo[playerid][Veh1]);
        }    
    }
    case 1:
    {
        if(pInfo[playerid][Veh2] != 9999)
        {
            C_Data[pInfo[playerid][Veh2]][Lock] = 1;
            CheckCar(pInfo[playerid][Veh2]);
        }    
    }
    case 2:
    {
        if(pInfo[playerid][Veh3] != 9999)
        {
            C_Data[pInfo[playerid][Veh3]][Lock] = 1;
            CheckCar(pInfo[playerid][Veh3]);
        }
    }
    }
    return 1;
}
Reply
#6

if(newkeys == KEY_SECONDARY_ATTACK)
this must be in public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
Reply
#7

Skaizo meant if(newkeys & KEY_SECONDARY_ATTACK), of course.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)