21.09.2010, 00:21
This command compiles without errors but it does give a few warnings. Although when I go in game and type /sethp it says Unknown command.
Warnings:
Also if anyone could tell me how to fix my other warnings (408 and 511).
Код:
COMMAND::sethp(playerid, params[]) { if (PlayerInfo[playerid][pAdmin] <= 1336) { new toplayer, // Player that is recieving HP newhp; if (!sscanf(params, "ii", toplayer, newhp)) { if (toplayer != INVALID_PLAYER_ID) { new message[40]; SetPlayerHealth(toplayer, newhp); format(message, sizeof(message), "Your HP has been set to $%d by an admin!", newhp); SendClientMessage(toplayer, COLOR_SYSTEM, message); } else SendClientMessage(playerid, COLOR_SYSTEM, "Invalid ID"); } else SendClientMessage(playerid, COLOR_SYSTEM, "[SYNTAX:] /sethp [id] [hp]"); } else SendClientMessage(playerid, COLOR_SYSTEM, "You're not authorized to use this command."); return 1; }
Код:
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\pawno\include\streamer.inc(408) : warning 202: number of arguments does not match definition C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\gamemodes\RCRP.pwn(232) : warning 217: loose indentation C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\gamemodes\RCRP.pwn(248) : warning 213: tag mismatch C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\gamemodes\RCRP.pwn(511) : warning 204: symbol is assigned a value that is never used: "string" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Warnings.