SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 02/05/2012, 02:59 PM   #1
NewerthRoleplay
High-roller
 
NewerthRoleplay's Avatar
 
Join Date: Nov 2011
Location: England :: The Danger Zone
Posts: 1,013
Reputation: 133
Exclamation [COMPILE ERROR] sethp abd setarmour!

Hey i got some more errors!!, dont ask about how i even compile on a mac its awkward xD
pawn Code:
C:\Users\Rob\Documents\PAWNO\gamemodes\NRP.pwn(692) : warning 217: loose indentation
C:\Users\Rob\Documents\PAWNO\gamemodes\NRP.pwn(693) : error 017: undefined symbol "otherplayerid"
C:\Users\Rob\Documents\PAWNO\gamemodes\NRP.pwn(694) : error 017: undefined symbol "otherplayerid"
C:\Users\Rob\Documents\PAWNO\gamemodes\NRP.pwn(697) : error 017: undefined symbol "otherplayerid"
C:\Users\Rob\Documents\PAWNO\gamemodes\NRP.pwn(698) : warning 217: loose indentation
C:\Users\Rob\Documents\PAWNO\gamemodes\NRP.pwn(699) : error 029: invalid expression, assumed zero
C:\Users\Rob\Documents\PAWNO\gamemodes\NRP.pwn(734) : warning 225: unreachable code
C:\Users\Rob\Documents\PAWNO\gamemodes\NRP.pwn(734) : warning 217: loose indentation
C:\Users\Rob\Documents\PAWNO\gamemodes\NRP.pwn(734) : error 029: invalid expression, assumed zero
C:\Users\Rob\Documents\PAWNO\gamemodes\NRP.pwn(734) : error 017: undefined symbol "cmd_rules"
C:\Users\Rob\Documents\PAWNO\gamemodes\NRP.pwn(734) : error 029: invalid expression, assumed zero
C:\Users\Rob\Documents\PAWNO\gamemodes\NRP.pwn(734) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 * * Copyright (c) 1997-2006, ITB CompuPhase


9 Errors.

Lines 692 - 734!
pawn Code:
CMD:givemoney(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] <= 2)
    (
        new otherplayerid;
        new money;
        if(!IsPlayerConnected(otherplayerid)) return SendClientMessage(playerid, COLOR_RED, " ** They are not online!");
        if(sscanf(params, "u", otherplayerid, money)) return SendClientMessage(playerid, COLOR_RED, "Use /givemoney [playerid/name] [amount of money]");
        SendClientMessage(playerid, COLOR_GREEN, " ** You have given that player some money");
        SendClientMessage(playerid, COLOR_GREEN, " ** You have been given money from a admin!");
        GivePlayerMoney(otherplayerid, money);
    {
    else SendClientMessage(playerid, COLOR_RED, " ** You need to be a level 2 admin to do that!");
    return 1;
}
CMD:sethp(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] <= 1)
    {
        new otherplayerid;
        new health;
        if(!IsPlayerConnected(otherplayerid)) return SendClientMessage(playerid, COLOR_RED, " ** They are not online!");
        if(sscanf(params, "u", otherplayerid, health)) return SendClientMessage(playerid, COLOR_RED, "Use /sethp [playerid/name] [amount of health]");
        SendClientMessage(playerid, COLOR_GREEN, " ** You have given that player some health");
        SendClientMessage(playerid, COLOR_GREEN, " ** You have been healed by a admin!");
        SetPlayerHealth(otherplayerid, health);
    }
    else SendClientMessage(playerid, COLOR_RED, " ** You need to be a level 1 admin to do that!");
    return 1;
}
CMD:setarmour(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] <= 1)
    {
        new otherplayerid;
        new armour;
        if(!IsPlayerConnected(otherplayerid)) return SendClientMessage(playerid, COLOR_RED, " ** They are not online!");
        if(sscanf(params, "u", otherplayerid, armour)) return SendClientMessage(playerid, COLOR_RED, "Use /setarmour [playerid/name] [amount of armour]");
        SendClientMessage(playerid, COLOR_GREEN, " ** You have given that player some armour");
        SendClientMessage(playerid, COLOR_GREEN, " ** You have been given armour by a admin!");
        SetPlayerArmour(otherplayerid, armour);
    }
    else SendClientMessage(playerid, COLOR_RED, " ** You need to be a level 1 admin to do that!");
    return 1;
}
__________________
NewerthRoleplay is offline   Reply With Quote
Old 02/05/2012, 03:09 PM   #2
Markô
Guest
 
Posts: n/a
Default Re: [COMPILE ERROR] sethp abd setarmour!

pawn Code:
CMD:givemoney(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 2)
    {
        new otherplayerid;
        new money;
        if(!IsPlayerConnected(otherplayerid)) return SendClientMessage(playerid, COLOR_RED, " ** They are not online!");
        if(sscanf(params, "u", otherplayerid, money)) return SendClientMessage(playerid, COLOR_RED, "Use /givemoney [playerid/name] [amount of money]");
        SendClientMessage(playerid, COLOR_GREEN, " ** You have given that player some money");
        SendClientMessage(playerid, COLOR_GREEN, " ** You have been given money from a admin!");
        GivePlayerMoney(otherplayerid, money);
    }  
    else return SendClientMessage(playerid, COLOR_RED, " ** You need to be a level 2 admin to do that!");
   
}
CMD:sethp(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
        new otherplayerid;
        new health;
        if(!IsPlayerConnected(otherplayerid)) return SendClientMessage(playerid, COLOR_RED, " ** They are not online!");
        if(sscanf(params, "u", otherplayerid, health)) return SendClientMessage(playerid, COLOR_RED, "Use /sethp [playerid/name] [amount of health]");
        SendClientMessage(playerid, COLOR_GREEN, " ** You have given that player some health");
        SendClientMessage(playerid, COLOR_GREEN, " ** You have been healed by a admin!");
        SetPlayerHealth(otherplayerid, health);
    }
    else return SendClientMessage(playerid, COLOR_RED, " ** You need to be a level 1 admin to do that!");
   
}
CMD:setarmour(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
        new otherplayerid;
        new armour;
        if(!IsPlayerConnected(otherplayerid)) return SendClientMessage(playerid, COLOR_RED, " ** They are not online!");
        if(sscanf(params, "u", otherplayerid, armour)) return SendClientMessage(playerid, COLOR_RED, "Use /setarmour [playerid/name] [amount of armour]");
        SendClientMessage(playerid, COLOR_GREEN, " ** You have given that player some armour");
        SendClientMessage(playerid, COLOR_GREEN, " ** You have been given armour by a admin!");
        SetPlayerArmour(otherplayerid, armour);
    }
    else return SendClientMessage(playerid, COLOR_RED, " ** You need to be a level 1 admin to do that!");
   
}
  Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile error ergan Scripting Help 3 23/12/2011 11:08 AM
[HElp] /sethealth, /setarmour [Lsgw]LoL Help Archive 1 28/06/2011 12:49 PM
error when compile Sfinx_17 Help Archive 4 23/08/2009 01:32 AM
Compile Error. Can Someone Compile For Me Please? RolePlay360 Help Archive 2 11/03/2009 09:56 PM


All times are GMT. The time now is 08:44 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.