/call error -
Justas888 - 08.01.2011
command:
Код:
COMMAND:skambinti( playerid, params[ ] )
{
new number;
if ( ZaidejoDB[ playerid ][ pPhNumber ] == 0 ) SendClientMessage(playerid, COLOR_GREY, " Jūs neturite mobilaus telefono !" );
else if ( sscanf( params, "d", number ) ) SendUsage ( playerid, "/skambinti [telefono numeris]" );
else if ( number < 1 ) SendClientMessage( playerid, COLOR_GREY, " Numeris nenaudojamas !" );
else if ( PlayerWounded[ playerid ] > 0 ) SendClientMessage( playerid, COLOR_GREY, " Jūs esate sunkiai suћeista(-s)." );
else;
{
new
name [ MAX_PLAYER_NAME ],
string[ 86 ];
GetPlayerRPName( playerid, name, MAX_PLAYER_NAME );
format ( string, 85, "* %s pasiima telefoną iљ savo kiљenės", name );
SendDistanceMessageEx ( 30.0, playerid, string, COLOR_PURPLE );
SetPlayerSpecialAction( playerid, SPECIAL_ACTION_USECELLPHONE );
if ( number == 112 )
{
SendClientMessage( playerid, COLOR_WHITE, "PATARIMAS: Dabar galite kalbėti paspaudus T raidę, galite padėti ragelį paraљius /padeti." );
SendClientMessage( playerid, COLOR_LIGHTPINK, "Moteriљkas balsas (telefonas): Ką norite iљkviesti? 'Policija', 'medikus' ar 'abu'?" );
MobilePhone[ playerid ] = 911;
return true;
}
if ( number == 555 )
{
SendClientMessage( playerid, COLOR_WHITE, "PATARIMAS: Dabar galite kalbėti paspaudus T raidę, galite padėti ragelį paraљius /padeti." );
SendClientMessage( playerid, COLOR_YELLOW, "Vyriљkas balsas (telefonu): Nusakykite Jūsų dabartinę vietą ir ko reikės iљ mechanikos." );
MobilePhone[ playerid ] = 555;
return true;
}
if ( number == 777 )
{
SendClientMessage( playerid, COLOR_WHITE, "PATARIMAS: Dabar galite kalbėti paspaudus T raidę, galite padėti ragelį paraљius /padeti." );
SendClientMessage( playerid, COLOR_YELLOW, "Vyriљkas balsas (telefonu): Nusakykite Jūsų dabartinę vietą kur norite, kad atsiųstumėm taksi." );
MobilePhone[ playerid ] = 777;
return true;
}
foreach (Player, i)
{
if ( !aLogged[ i ] ) continue;
// Jeigu ћaidėjo numeris sutampa su įvestu numeriu
if ( number == PlayerInfo[ i ][ pPhNumber ] )
{
// Jei ћaidėjo telefonas neuћimtas
if ( MobilePhone[ i ] == INVALID_PLAYER_ID )
{
if ( PhTog[ i ] )
return SendClientMessage( playerid, COLOR_GREY, " Ћaidėjo telefonas yra iљjungtas !" );
// Sujungiame ћaidėją su kitu ћaidėju
MobilePhone[ playerid ] = i;
GetPlayerName( playerid, name, MAX_PLAYER_NAME );
format ( string, 85, "Jums skambina į mobilujį telefoną, numeris: %d (( %s ))", PlayerInfo[ playerid ][ pPhNumber ], name );
SendClientMessage( i, COLOR_YELLOW, string );
SendClientMessage( playerid, COLOR_WHITE, "PATARIMAS: Jūs galite padėti ragelį paraљius /padeti." );
SendClientMessage( i, COLOR_WHITE, "PATARIMAS: Jūs galite padėti ragelį paraљius /padeti." );
RingTone[ i ] = 10;
GetPlayerRPName( i, name, MAX_PLAYER_NAME );
format ( string, 85, "* Telefonas pradeda skambėti (( %s ))", name );
SendDistanceMessageEx( 30.0, i, string, COLOR_PURPLE );
ShowInfoText( i, "~w~Jusu mobilusis telefonas pradeda skambeti. Jus galite ~g~/pakelti ~w~rageli arba ~r~/padeti ~w~rageli.", 6000 );
return true;
}
else
{
SendClientMessage( playerid, COLOR_GREY, " Numeris uћimtas !" );
return true;
}
}
}
SendClientMessage( playerid, COLOR_GREY, " Numeris nenaudojamas arba ћaidėjas nėra prisijungęs !" );
}
return true;
}
C:\Users\Justas\Downloads\Mano\GRP pats geriausias\Real-Life\gamemodes\Real-Life.pwn(992) : error 029: invalid expression, assumed zero
C:\Users\Justas\Downloads\Mano\GRP pats geriausias\Real-Life\gamemodes\Real-Life.pwn(992) : warning 215: expression has no effect
C:\Users\Justas\Downloads\Mano\GRP pats geriausias\Real-Life\gamemodes\Real-Life.pwn(992) : error 001: expected token: ";", but found ")"
C:\Users\Justas\Downloads\Mano\GRP pats geriausias\Real-Life\gamemodes\Real-Life.pwn(992) : error 029: invalid expression, assumed zero
C:\Users\Justas\Downloads\Mano\GRP pats geriausias\Real-Life\gamemodes\Real-Life.pwn(992) : fatal error 107: too many error messages on one line
Re: /call error -
Lorenc_ - 08.01.2011
Go to line 992 and add a ; beside the function, GAWD.
Re: /call error -
Steven82 - 08.01.2011
It seems to me, people just copy paste and change text. Honestly, and if you actually truly did make this command, pay more attention next time.
Re: /call error -
Kyosaur - 08.01.2011
Quote:
Originally Posted by Lorenc_
Go to line 992 and add a ; beside the function, GAWD.
|
At least go as far as telling him the line lol. I dont see a missing semicolon at all in the above code, so point it out to me as well (its possible i missed it though to be fair, it is 4 am).
The issue is because you ADDED a semicolon to this line:
Thats why you're getting an invalid expression error. Judging from the line numbers, i think you're fine once you fix this. If not post again with the new issues.