23.07.2012, 17:38
(
Last edited by bodey3333; 23/07/2012 at 05:47 PM.
Reason: !More explaining!
)
First.The first code isn't tried yet. Because GTA SA got deleted from my PC. So please test it and tell me if there is a problem in it.
Second.This code,Has a problem it doesn't want to get complied there are 5-6 errors while compling. So can you tell me about the right format for fixing it? And please explain the solution.
Errors:-
error 035: argument type mismatch (argument 2)
error 017: undefined symbol "Player"
error 017: undefined symbol "s"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Code:
if (strcmp("/announce %s", cmdtext, true, 10) == 0) { if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "You are not authorized to use this command!"); else SendClientMessage(playerid, 0xFF0000FF, "Announcement posted successfully!"); SendClientMessageToAll(0xFF0000FF, "(( Admin Announcement: %s ))") ;
Code:
{ if (strcmp("/sethealth (Player) %s", true, 10) == 0) if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "You are not authorized to use this command!"); else SendClientMessage(playerid, 0xFF0000FF, " (Player) health was setted to %s ."); SetPlayerHealth(Player, %s) SendClientMessage(Player, 0xFF0000FF, " (playerid) has setted your health to %s . ") ;
error 035: argument type mismatch (argument 2)
error 017: undefined symbol "Player"
error 017: undefined symbol "s"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line