Help with Robstore
#1

hey everyone im trying to add a robpoint inside a building and i keep gettings errors. heres the script.
------------------------------------------------------------------------------------------------------
if(strcmp(cmdtext, "/robstore", true) == 0)
{
if(IsSpawned[playerid] == 0) {
SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
return 1;
}
if(Jailed[playerid] == 1) {
SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
return 1;
}
if(AutoRobbed == 1) {
SendClientMessage(playerid,COLOR_ERROR,"this convience store has been robbed recently, Please wait");
return 1;
}
if(UsedAutoRecently[playerid] >= 1) {
SendClientMessage(playerid,COLOR_ERROR,"Please wait before using the convience store again");
return 1;
}
if(IsPlayerInAnyVehicle(playerid)) {
format(string, sizeof(string), "You cannot rob the convience store while in a vehicle");
SendClientMessage(playerid, COLOR_ERROR, string);
return 1;
}
if(!IsPlayerInCheckpoint(playerid)) {
SendClientMessage(playerid,COLOR_ERROR,"You are not in any convience store checkpoint");
return 1;
}
if(gTeam[playerid] == TEAM_COP || gTeam[playerid] == TEAM_ARMY || gTeam[playerid] == TEAM_MEDIC || gTeam[playerid] == TEAM_CASSEC || gTeam[playerid] == TEAM_JAILTK) || gTeam[playerid] == TEAM_IONARMY) {
SendClientMessage(playerid,COLOR_ERROR,"You cannot rob anything");
return 1;
}
if(IsPlayerInCheckpoint(playerid) && getCheckpointType(playerid) == 97)
{
if(robberrank[playerid] <=2) {
SendClientMessage(playerid,COLOR_ERROR,"Your skill is to low. stick to /rob(ing) players");
return 1;
}
new zrand = random(5000);
if(zrand >=0 && zrand <=1000) {
SendClientMessage(playerid, 0xA9A9A9AA, "|_Robbery Failed_|");
SendClientMessage(playerid,COLOR_ERROR,"You Have Failed To Rob The Convience Store");
return 1;
}
else
if(zrand >=1001 && zrand <=5000)
{
if(IsPlayerInCheckpoint(playerid) && getCheckpointType(playerid) == 97) {
{
new plwl = GetPlayerWantedLevel(playerid);
SetPlayerWantedLevel(playerid, plwl +4 );
new mrand = random(175000);
new pname[30];
GetPlayerName(playerid, pname, 30);
format(string, sizeof(string), "%s(%d) Has robbed $%d from The Convience store",pname,playerid,mrand);
SendClientMessageToAll(0x00C7FFAA, string);
ircSay(EchoConnection, EchoChan,string);
format(string, sizeof(string), "%s(%d) Has robbed $%d from The Convience store",pname,playerid,mrand);
printf("%s", string);
format(string, sizeof(string), "~w~ROBBERY ~b~COMPLETE~n~~w~YOU ROBBED~n~~r~ $%d~n~~w~FROM the Convience Store", mrand);
GameTextForPlayer(playerid, string, 7000, 3);
new pcol = GetPlayerColor(playerid);
plwl = GetPlayerWantedLevel(playerid);
SendClientMessage(playerid, 0xA9A9A9AA, "|_Crime Commited_|");
format(string, sizeof(string), "(Convience Store ROBBERY) Wanted Level %d",plwl);
SendClientMessage(playerid,pcol,string);
GivePlayerMoney(playerid, mrand);
oscore = GetPlayerScore(playerid);
ConRobbed =1;
UsedAutoRecently[playerid] += 320;
SetPlayerScore(playerid, oscore +1);
if(robberrank[playerid] >=2 && robberrank[playerid] <=39) {
SendClientMessage(playerid,COLOR_WHITE,"Your robbing skill level has been increased. Type /robskill for more info");
robberrank[playerid] +=1;
commitedcrimerecently[playerid] +=360;
}
SetTimer("ConRecent",70000,0);
for(new i=0;i<MAX_PLAYERS;i++)
{
if(LawEnforcementRadio[i] == 1) {
new string1[256];
new string2[256];
new string3[256];
format(string1, sizeof(string1), "DISPATCH: (Convience Store Robbery) Suspect: %s(%d)", pname,playerid);
format(string2, sizeof(string2), "ALL UNITS: Please respond to the Convience store by the police base");
format(string3, sizeof(string3), "Type /radoff to turn your Law Enforcement radio off");
SendClientMessage(i, COLOR_ROYALBLUE, string1);
SendClientMessage(i, COLOR_ROYALBLUE, string2);
SendClientMessage(i, COLOR_DODGERBLUE, string3);
{
if(IsPlayerConnected(i))
{
autobahnowner[i]=dUserINT(PlayerName(i)).("autobahnowner");
if(autobahnowner[i] == 1337)
{
GetPlayerName(i,autobahnowner,24);
SendClientMessage(i, 0xA9A9A9AA, "|_Autobahn Robbery_|");
format(string, sizeof(string), "%s(%d) has robbed $%d from your Autobahn",pname,playerid,mrand);
SendClientMessage(i, 0x00C7FFAA, string);
SendClientMessage(i, 0xA9A9A9AA, "If Your tired of losing money from the AirPort then use /sellautobahn (ID)");
GivePlayerMoney(i,- mrand);
}
}
}
}
}
}
}
}
}
return 1;
}
------------------
errors=
C:\Users\Austin\Desktop\GTA San Andreas\pawno\1.9.pwn(6400) : error 029: invalid expression, assumed zero
C:\Users\Austin\Desktop\GTA San Andreas\pawno\1.9.pwn(6400) : warning 215: expression has no effect
C:\Users\Austin\Desktop\GTA San Andreas\pawno\1.9.pwn(6400) : error 001: expected token: ";", but found ")"
C:\Users\Austin\Desktop\GTA San Andreas\pawno\1.9.pwn(6400) : error 029: invalid expression, assumed zero
C:\Users\Austin\Desktop\GTA San Andreas\pawno\1.9.pwn(6400) : fatal error 107: too many error messages on one line

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


4 Errors.
Reply
#2

Use [pawn] [ /pawn] without the space.
Reply
#3

pawn Код:
f(IsSpawned[playerid] == 0)
        {
            SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
        }
        else if(Jailed[playerid] == 1)
        {
            SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
        }
        else if(AutoRobbed == 1)
        {
            SendClientMessage(playerid,COLOR_ERROR,"this convience store has been robbed recently, Please wait");
        }
        else if(UsedAutoRecently[playerid] >= 1)
        {
            SendClientMessage(playerid,COLOR_ERROR,"Please wait before using the convience store again");
        }
        else if(IsPlayerInAnyVehicle(playerid))
        {
            format(string, sizeof(string), "You cannot rob the convience store while in a vehicle");
            SendClientMessage(playerid, COLOR_ERROR, string);
        }
        else if(!IsPlayerInCheckpoint(playerid))
        {
            SendClientMessage(playerid,COLOR_ERROR,"You are not in any convience store checkpoint");
        }
        else if(gTeam[playerid] == TEAM_COP || gTeam[playerid] == TEAM_ARMY || gTeam[playerid] == TEAM_MEDIC || gTeam[playerid] == TEAM_CASSEC || gTeam[playerid] == TEAM_JAILTK) || gTeam[playerid] == TEAM_IONARMY)
        {
            SendClientMessage(playerid,COLOR_ERROR,"You cannot rob anything");
        }
        else if(IsPlayerInCheckpoint(playerid) && getCheckpointType(playerid) == 97)
        {
            if(robberrank[playerid] <=2)
            {
                SendClientMessage(playerid,COLOR_ERROR,"Your skill is to low. stick to /rob(ing) players");
            }
        }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)