PDA

View Full Version : Command help


EthanMason
14/11/2013, 10:49 AM
CMD:joinjob2(playerid,params[])
{
if(IsPlayerInRangeOfPoint(playerid,5, 43.6374,-224.5082,1.6927))
{
if(pInfo[playerid][Job2] == 0)
{
if(pInfo[playerid][VIPLevel] > 0)
{
if (!pInfo[playerid][Job1] == 1)
{
pInfo[playerid][Job2] = 1;
SendClientMessage(playerid, red, "[SERVER]: You have joined the Transporter Job");
}
else
{
SendClientMessage(playerid, red, "[SERVER]: {FFFFFF} Seems like your first job is the same job you're joining now");
}
}
else
{
SendClientMessage(playerid, red, "[SERVER]: {FFFFFF} You need to have atleast VIP level 1 to have a second job");
}
}
}
}


Eh i dunno why i get this Errors :(

C:\Users\dell\Desktop\Script\gamemodes\newroleplay server.pwn(322) : error 029: invalid expression, assumed zero
C:\Users\dell\Desktop\Script\gamemodes\newroleplay server.pwn(322) : error 017: undefined symbol "cmd_joinjob2"
C:\Users\dell\Desktop\Script\gamemodes\newroleplay server.pwn(322) : error 029: invalid expression, assumed zero
C:\Users\dell\Desktop\Script\gamemodes\newroleplay server.pwn(322) : fatal error 107: too many error messages on one line

[CMD:joinjob2...] is line number 322

SilentSoul
14/11/2013, 10:52 AM
You forgot to add return 1;
CMD:joinjob2(playerid,params[])
{
if(IsPlayerInRangeOfPoint(playerid,5, 43.6374,-224.5082,1.6927))
{
if(pInfo[playerid][Job2] == 0)
{
if(pInfo[playerid][VIPLevel] > 0)
{
if (!pInfo[playerid][Job1] == 1)
{
pInfo[playerid][Job2] = 1;
SendClientMessage(playerid, red, "[SERVER]: You have joined the Transporter Job");
}
else
{
SendClientMessage(playerid, red, "[SERVER]: {FFFFFF} Seems like your first job is the same job you're joining now");
}
}
else
{
SendClientMessage(playerid, red, "[SERVER]: {FFFFFF} You need to have atleast VIP level 1 to have a second job");
}
}
}
return 1; //this line missing
}