02.08.2014, 19:30
Someone help me out please cause I have some rrors that i can't solve, if you can help me out i would appricete it
Errors:
Lines of errors:
Line 93: SendClientMessage( playerid, INFO, szStr );
Line 102: pInfo[ playerid ][ Robskill ] ++;
Errors:
pawn Код:
Line 93: error 017: undefined symbol "ROB"
Line 93: error 017: undefined symbol "INFO"
Line 102: error 017: undefined symbol "pInfo"
Line 102: warning 215: expression has no effect
Line 102: error 001: expected token: ";", but found "]"
Line 102: error 029: invalid expression, assumed zero
Line 102: fatal error 107: too many error messages on one line
Line 93: SendClientMessage( playerid, INFO, szStr );
Line 102: pInfo[ playerid ][ Robskill ] ++;
pawn Код:
#include <a_samp>
#include <Streamer>
forward robPizza( playerid ); //Add this to the top of your script under your includes!
new
robTimerP[ MAX_PLAYERS ],
cp_Pizza,
bool: pRobbingP[ MAX_PLAYERS ],
bool: pizzaRobbed;
public OnFilterScriptInit()
{
cp_Pizza = CreateDynamicCP( 378.2259, -114.4946, 1001.4922, 2.0, .interiorid = 5);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerEnterDynamicCP( playerid, checkpointid )
{
if( pRobbingP[ playerid ] )
{
if ( checkpointid == cp_Pizza )
{
pRobbingP[ playerid ] = false;
KillTimer( robTimerP[ playerid ] );
pizzaRobbed = false;
GameTextForPlayer( playerid, "~r~You have failed the robbery!", 1000, 3 );
}
}
return true;
}
//IDLEWOOD PIZZA
CMD:robpizza( playerid, params[ ] )
{
if ( pRobbingP[ playerid ] )
return SendClientMessage( playerid, RED, "ERROR:{FFFFFF} You are already robbing Idlewood Pizza" );
if ( !IsPlayerInRangeOfPoint( playerid, 3.0, 378.2259, -114.4946, 1001.4922 ) )
return SendClientMessage( playerid, RED, "ERROR:{FFFFFF} You must be in the checkpoint at Idlewood Pizza to use this command!" );
if ( pizzaRobbed )
return SendClientMessage( playerid, RED, "ERROR:{FFFFFF} Idlewood Pizza has been robbed recently, please wait patiently!" );
robTimerP[ playerid ] = SetTimerEx( "robPizza", 30000, false, "i", playerid );
SendClientMessage( playerid, INFO, "[ROBBERY INFO] You have started a robbery, it will last 30 seconds. Do not leave the checkpoint!" );
pRobbingP[ playerid ] = true;
pizzaRobbed = true;
new
szStr[ 128 ],
usrName[ 24 ];
GetPlayerName( playerid, usrName, 24 );
format( szStr, 128, "[ROBBERY] %s has began a robbery at Idlewood Pizza!", usrName );
SendClientMessageToAll( ROB, szStr );
GameTextForPlayer( playerid, "~g~Robbery in process~n~~r~Do not leave the checkpoint!", 30000, 3 );
SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) +2);
return true;
}
public robPizza( playerid )
{
new
randMoney = random( 96000 );
GivePlayerMoney( playerid, randMoney );
new
szStr[ 128 ],
szStr1[128],
usrName[ 24 ];
GetPlayerName( playerid, usrName, 24 );
format( szStr, 128, "[ROBBERY] %s has robbed $%d from Idlewood Pizza!", usrName, randMoney );
SendClientMessageToAll( ROB, szStr );
format( szStr, 128, "[ROBBERY INFO] Robbery succesfull! You have earned $%d and 1 score from the robbery.", randMoney );
SendClientMessage( playerid, INFO, szStr );
pRobbingP[ playerid ] = false;
SetTimer( "pizzaDelay", 90000, false );
format(szStr1, sizeof (szStr1), "~g~You have succesfuly robbed $%d from Idlewood Pizza!", randMoney);
GameTextForPlayer( playerid, szStr1, 3000, 3 );
SetPlayerScore(playerid, GetPlayerScore(playerid) +1 );
pInfo[ playerid ][ Robskill ] ++;
}
forward pizzaDelay( );
public pizzaDelay( )
{
pizzaRobbed = false;
return true;
}