10.07.2018, 17:40
I'm trying to make an anticheat...it's kinda different cause it is used by a command, but i just want to get rid of these errors and i can't
Annnndd the errors and warnings :/
Код:
CMD:achh(playerid, params[]) { new userid, Float:x, Float:y, Float:z, Float:ohp, Float:oar, Float:nhp, Float:nar; if(PlayerInfo[playerid][pAdmin] < 2) return SCM(playerid,COLOR_ERROR,"Error: You must be admin level 2!"); if(sscanf(params, "u", userid)) return SCM(playerid,COLOR_GREY,"Usage: /achh [UserID]"); else if(userid == INVALID_PLAYER_ID) return SCM(playerid,COLOR_ERROR,"Error: Player is not connected!"); else if(userid == playerid) return SCM(playerid,COLOR_ERROR,"Error: You cannot use this command on yourself!"); else { ohp == GetPlayerHealth(userid); oar == GetPlayerArmour(userid); GetPlayerPos(userid, x, y, z); CreateExplosion(x, y, z, 7, 10.0); nhp == GetPlayerHealth(userid); nar == GetPlayerArmour(userid); CreateExplosion(x, y ,z , 10, 10.0); SCM(playerid,0xFF4D4DFF,"{FF4D4D}[ANTI-CHEAT]: {DED9D9}Explosion created, wait for results!"); if(ohp != nhp && oar != nar) return SCM(playerid,"{FF4D4D}[ANTI-CHEAT] {DED9D9}RESULTS: Player is not having HH!"), SCM(userid,-1,"{FF4D4D}[ANTI-CHEAT]: {DED9D9}You've been exploded due Hack Acusations!"); if(ohp == nhp && oar == nar) return SCM(playerid,"{FF4D4D}[ANTI-CHEAT]: Player is having HH!"), SCM(userid,COLOR_ERROR,"[ANTI-CHEAT]: You've been kicked from the server! Reason: Using HealthHack"); } return 1; }
Код:
C:\Users\Seby\Desktop\SampServer\gamemodes\RSV.pwn(937) : warning 202: number of arguments does not match definition C:\Users\Seby\Desktop\SampServer\gamemodes\RSV.pwn(937) : warning 215: expression has no effect C:\Users\Seby\Desktop\SampServer\gamemodes\RSV.pwn(938) : warning 202: number of arguments does not match definition C:\Users\Seby\Desktop\SampServer\gamemodes\RSV.pwn(938) : warning 215: expression has no effect C:\Users\Seby\Desktop\SampServer\gamemodes\RSV.pwn(941) : warning 202: number of arguments does not match definition C:\Users\Seby\Desktop\SampServer\gamemodes\RSV.pwn(941) : warning 215: expression has no effect C:\Users\Seby\Desktop\SampServer\gamemodes\RSV.pwn(942) : warning 202: number of arguments does not match definition C:\Users\Seby\Desktop\SampServer\gamemodes\RSV.pwn(942) : warning 215: expression has no effect C:\Users\Seby\Desktop\SampServer\gamemodes\RSV.pwn(945) : error 035: argument type mismatch (argument 2) C:\Users\Seby\Desktop\SampServer\gamemodes\RSV.pwn(946) : error 035: argument type mismatch (argument 2) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase