[help]What are these errors?
#1

Here is the code, taken from LAdmin, edited by me:

pawn Код:
dcmd_slap(playerid,params[]) {
    if(PlayerInfo[playerid][LoggedIn] == 1) {
        if(PlayerInfo[playerid][Level] >= 2) {
          new tmp[256], tmp2[256], Index;       tmp = strtok(params,Index), tmp2 = strtok(params,Index);
          if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /slap [playerid] [reason/with]");
            player1 = strval(tmp);              new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
            GetPlayerName(player1, playername, sizeof(playername));
            GetPlayerName(playerid, adminname, sizeof(adminname));
            new Float:Health, Float:x, Float:y, Float:z; GetPlayerHealth(player1,Health);
            GetPlayerPos(player1,x,y,z); SetPlayerPos(player1,x,y,z+26); PlayerPlaySound(playerid,1190,0.0,0.0,0.0); PlayerPlaySound(player1,1190,0.0,0.0,0.0);

            if(strlen(tmp2)) {
                format(string,sizeof(string),"%s (id:%d) has slapped %s (id:%d) for: %s",adminname,playerid,playername,player1,params[2]); return SendClientMessageToAll(orange,string); }
                } else {
                format(string,sizeof(string),"%s (id:%d) has slapped %s (%d) for [No Reason Defined]",adminname,playerid,playername,player1); return SendClientMessageToAll(orange,string); }
        } else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
    } else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands");
}
Errors:
Код:
(2597) : error 017: undefined symbol "player1"
(2606) : error 017: undefined symbol "string"
(2606) : error 017: undefined symbol "string"
(2606) : error 029: invalid expression, assumed zero
(2606) : fatal error 107: too many error messages on one line
Greetz
Reply
#2

stop posting this topic everywhere
Reply
#3

It is actually in 0.3 scripting, but, since LAdmin is from 0.2, I thought I'd post here aswell.

Any helpful suggestions?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)