28.04.2009, 11:38
Hey!
I have Copy a script from this page:
http://forum.sa-mp.com/index.php?topic=90702.0
But there are 6 errors!
Can anyone help me?
Errors:
warning 202: number of arguments does not match definition
penls.pwn(15936) : warning 217: loose indentation
penls.pwn(15945) : warning 217: loose indentation
Cpenls.pwn(15949) : warning 217: loose indentation
penls.pwn(15952) : warning 217: loose indentation
penls.pwn(15953) : warning 217: loose indentation
penls.pwn(15964) : error 029: invalid expression, assumed zero
penls.pwn(15965) : warning 217: loose indentation
penls.pwn(15976) : error 017: undefined symbol "ReturnUser"
penls.pwn(15981) : error 017: undefined symbol "PlayerCuffed"
penls.pwn(15981) : warning 215: expression has no effect
penls.pwn(15981) : error 001: expected token: ";", but found "]"
penls.pwn(15981) : error 029: invalid expression, assumed zero
penls.pwn(15981) : fatal error 107: too many error messages on one line
And the Pawno Codes:
Copy this to your Pawno, and you can see the errors.
Please help me... :<
I have Copy a script from this page:
http://forum.sa-mp.com/index.php?topic=90702.0
But there are 6 errors!
Can anyone help me?
Errors:
warning 202: number of arguments does not match definition
penls.pwn(15936) : warning 217: loose indentation
penls.pwn(15945) : warning 217: loose indentation
Cpenls.pwn(15949) : warning 217: loose indentation
penls.pwn(15952) : warning 217: loose indentation
penls.pwn(15953) : warning 217: loose indentation
penls.pwn(15964) : error 029: invalid expression, assumed zero
penls.pwn(15965) : warning 217: loose indentation
penls.pwn(15976) : error 017: undefined symbol "ReturnUser"
penls.pwn(15981) : error 017: undefined symbol "PlayerCuffed"
penls.pwn(15981) : warning 215: expression has no effect
penls.pwn(15981) : error 001: expected token: ";", but found "]"
penls.pwn(15981) : error 029: invalid expression, assumed zero
penls.pwn(15981) : fatal error 107: too many error messages on one line
And the Pawno Codes:
Quote:
//-----------------------------------[CUFF]----------------------------- if (strcmp(cmd, "/cuff", true) == 0) { if(IsPlayerConnected(playerid)) { if(gTeam[playerid] == 2 || (playerid))) { if(IsPlayerInAnyVehicle(playerid)) { SendClientMessage(playerid, COLOR_GREY, " Cannot use this while being in the Car !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /cuff [Playerid/PartOfName]"); return 1; } giveplayerid = ReturnUser(tmp); if (IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(PlayerCuffed[giveplayerid] == 2) { SendClientMessage(playerid, COLOR_GREY, " player is all ready cuffed"); return 1; } if(gTeam[giveplayerid] == 2 || IsACop(giveplayerid)) { SendClientMessage(playerid, COLOR_GREY, " You can't Cuff Cops !"); return 1; } if (ProxDetectorS(8.0, playerid, giveplayerid)) { if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Cuff yourself!"); return 1; } { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* You were Cuffed by %s, till uncuff.", sendername); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* You Cuffed %s, till uncuff.", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* %s Hand Cuffs %s, so he wont go anywhere.", sendername ,giveplayer); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE); GameTextForPlayer(giveplayerid, "~r~Cuffed", 2500, 3); TogglePlayerControllable(giveplayerid, 0); ApplyAnimation(giveplayerid,"ped","cower",1,1,0,0, 0,0); ApplyAnimation(giveplayerid,"ped","cower",1,1,0,0, 0,0); PlayerCuffed[giveplayerid] = 2; PlayerCuffedTime[giveplayerid] = 300; } } else { SendClientMessage(playerid, COLOR_GREY, " That player is not near you !"); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, " That player is Offline !"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " You are not a Cop / FBI!"); } } return 1; } //-----------------------------------[JAIL]------------------ if(strcmp(cmd, "/jail", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /jail [playerid/PartOfName] [time(minutes)]"); return 1; } new playa; new money; playa = ReturnUser(tmp); tmp = strtok(cmdtext, idx); money = strval(tmp); if (PlayerInfo[playerid][pAdmin] >= 2) { if(IsPlayerConnected(playa)) { if(playa != INVALID_PLAYER_ID) { GetPlayerName(playa, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* You Jailed %s.", giveplayer); SendClientMessage(playerid, COLOR_LIGHTRED, string); format(string, sizeof(string), "* You were Jailed by Admin %s.", sendername); SendClientMessage(playa, COLOR_LIGHTRED, string); ResetPlayerWeapons(playa); WantedPoints[playa] = 0; PlayerInfo[playa][pJailed] = 1; PlayerInfo[playa][pJailTime] = money*60; SetPlayerInterior(playa, 6); SetPlayerPos(playa, 835.5152,-2062.5933,64.6337); format(string, sizeof(string), "You are jailed for %d minutes. Bail: Unable", money); SendClientMessage(playa, COLOR_LIGHTBLUE, string); } } } else { SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!"); } } return 1; } //----------------------------------[TICKET]----------------- f(strcmp(cmd, "/ticket", true) == 0) { if(IsPlayerConnected(playerid)) { if(gTeam[playerid] != 2) { SendClientMessage(playerid, COLOR_GREY, " You are not a Cop!"); return 1; } if(OnDuty[playerid] != 1 && PlayerInfo[playerid][pMember] == 1) { SendClientMessage(playerid, COLOR_GREY, " You are not on Duty!"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /ticket [playerid/PartOfName] [price] [reason]"); return 1; } giveplayerid = ReturnUser(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /ticket [playerid/PartOfName] [price] [reason]"); return 1; } moneys = strval(tmp); if(moneys < 1 || moneys > 99999) { SendClientMessage(playerid, COLOR_GREY, " Ticket Money can't be below 1 or higher then 99999 !"); return 1; } if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if (ProxDetectorS(8.0, playerid, giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /ticket [playerid/PartOfName] [price] [reason]"); return 1; } format(string, sizeof(string), "* You gave %s a Ticket costing $%d, reason: %s", giveplayer, moneys, (result)); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* Officer %s has given you a Ticket costing $%d, reason: %s", sendername, moneys, (result)); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, "* Type /accept ticket, to accept it."); TicketOffer[giveplayerid] = playerid; TicketMoney[giveplayerid] = moneys; return 1; } else { SendClientMessage(playerid, COLOR_GREY, " That player is not near you !"); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, " That player is Offline !"); return 1; } } return 1; } //------------------------------------[STUN]------------------------------ (strcmp(cmd, "/tazer", true) ==0) { if(IsPlayerConnected(playerid)) { if(gTeam[playerid] == 2 || IsACop(playerid)) { if(IsPlayerInAnyVehicle(playerid)) { SendClientMessage(playerid, COLOR_GREY, " Cannot use this while being in the Car !"); return 1; } new suspect = GetClosestPlayer(playerid); if(IsPlayerConnected(suspect)) { if(PlayerCuffed[suspect] > 0) { SendClientMessage(playerid, COLOR_GREY, " Player already Cuffed !"); return 1; } if(GetDistanceBetweenPlayers(playerid,suspect) < 5) { if(gTeam[suspect] == 2) { SendClientMessage(playerid, COLOR_GREY, " Cannot Tazer Cops / FBI / National Guard !"); return 1; } if(IsPlayerInAnyVehicle(suspect)) { SendClientMessage(playerid, COLOR_GREY, " Suspect is in a Car, get him out first !"); return 1; } GetPlayerName(suspect, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* You were Tazed by %s for 8 seconds.", sendername); SendClientMessage(suspect, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* You Tazed %s for 8 seconds.", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* %s shoots with his Tazer at %s, and tazed him.", sendername ,giveplayer); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE); GameTextForPlayer(suspect, "~r~Tazed", 2500, 3); TogglePlayerControllable(suspect, 0); PlayerCuffed[suspect] = 1; PlayerCuffedTime[suspect] = 8; } else { SendClientMessage(playerid, COLOR_GREY, " No-one near you!"); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, " You are not a Cop / FBI / National Guard !"); } }//not connected return 1; } |
Please help me... :<