[Help] Crash when try to compile
#1

Hello everyone.I've tried to make a comand to teleport in some areas but when i compile it's crashing my pawn....


PHP код:
CMD:gotoloc(playerid,params[])
{
    new 
loc[32];
    if(
sscanf(params,"s[32]",loc))
    {
        
SendClientMessage(playerid,COLOR_GREY,"Syntax: /gotoloc [Location]");
        if(
PlayerInfo[playerid][pHelper] >= || PlayerInfo[playerid][pAdmin] >= 0) return SendClientMessage(playerid,COLOR_GREY,"Helper: dmv | zip | prolaps | binco");
        if(
PlayerInfo[playerid][pAdmin] >= 0) return SendClientMessage(playerid,COLOR_GREY,"Admin (1): ls | sf | als | aa | bank");
        if(
PlayerInfo[playerid][pAdmin] >= 2) return SendClientMessage(playerid,COLOR_GREY,"Admin (3): lcs | tcc | ballas | grove | lcn | lsr");
    }
    else if(!
strcmp(loc,"ls",true))
    {
        if(
PlayerInfo[playerid][pAdmin] >=1)
        {
            
SetPlayerPos(playerid,1522.7998,-1676.8551,13.3300);
            
SendClientMessage(playeridCOLOR_GREY"You have been teleported in front of city hall. ( LS )");
            
SetPlayerInterior(playerid,0);
        }
        else{
SendClientMessage(playerid,COLOR_GREY,"You aren;t authorized to use this command !");}
    }
    else if(!
strcmp(loc,"sf",true))
    {
        if(
PlayerInfo[playerid][pAdmin] >=1)
        {
            
SetPlayerPos(playerid,-1985.9495,138.0197,27.6875);
            
SendClientMessage(playerid,COLOR_GREY,"You have been teleported in tha train station. ( SF ) ");
            
SetPlayerInterior(playerid,0);
        }
        else{
SendClientMessage(playerid,COLOR_GREY,"You aren't authorized to use this command !");}
    }
    else if(!
strcmp(loc,"als",true))
    {
        if(
PlayerInfo[playerid][pAdmin] >=1)
        {
            
SetPlayerPos(playerid,1512.6252,-2286.9243,13.5469);
            
SendClientMessage(playerid,COLOR_GREY,"You have been teleport at airport. ( LS )");
            
SetPlayerInterior(playerid,0);
        }
        else{
SendClientMessage(playerid,COLOR_GREY,"You aren't authorized to use this command");}
    }
    else if(!
strcmp(loc,"aa",true))
    {
        if(
PlayerInfo[playerid][pAdmin] >=1)
        {
            
SetPlayerPos(playerid,425.2502,2530.0415,16.6376);
            
SendClientMessage(playerid,COLOR_GREY,"You have been teleport at abandoned airport. ( LV )");
            
SetPlayerInterior(playerid,0);
        }
        else{
SendClientMessage(playerid,COLOR_GREY,"you aren't authorized to use this command");}
    }
    else if(!
strcmp(loc,"bank",true))
    {
        if(
PlayerInfo[playerid][pAdmin] >=1)
        {
            
SetPlayerPos(playerid,1463.3246,-1025.4733,23.8281);
            
SendClientMessage(playerid,COLOR_GREY,"You have been teleported in front on bank. ( LS )");
            
SetPlayerInterior(playerid,0);
        }
        else{
SendClientMessage(playerid,COLOR_GREY,"You aren't authorized to use this command !");}
    }
    else if(!
strcmp(loc,"lcs",true))
    {
        if(
PlayerInfo[playerid][pAdmin] >= 3)
        {
            
SetPlayerPos(playerid,1777.1871,-1774.7146,52.4688);
            
SendClientMessage(playerid,COLOR_GREY,"You have been teleported to L.C.S. arena. ( LS )");
            
SetPlayerInterior(playerid,0);
        }
        else{
SendClientMessage(playerid,COLOR_GREY,"You aren't authorized to use this command !");}
    }
    else if(!
strcmp(loc,"tcc",true))
    {
        if(
PlayerInfo[playerid][pAdmin] >=3)
        {
            
SetPlayerPos(playerid,915.1257,-1252.3115,15.6641);
            
SendClientMessage(playerid,COLOR_GREY,"You have been teleported to T.C.C. HQ. ( LS )");
            
SetPlayerInterior(playerid,0);
        }
        else{
SendClientMessage(playerid,COLOR_GREY,"You aren't authorized to use this command !");}
    }
    else if(!
strcmp(loc,"",true))
    {
        if(
PlayerInfo[playerid][pAdmin] >=3)
        {
            
SetPlayerPos(playerid,1955.8622,-1127.1737,25.8732);
            
SendClientMessage(playerid,COLOR_GREY,"You have been teleported to Ballas HQ. ( LS )");
            
SetPlayerInterior(playerid,0);
        }
        else{
SendClientMessage(playerid,COLOR_GREY,"You aren't authorized to use this command !");}
    }
    else if(!
strcmp(loc,"grove",true))
    {
        if(
PlayerInfo[playerid][pAdmin] >=3)
        {
            
SetPlayerPos(playerid,2489.6226,-1667.6965,13.3438);
            
SendClientMessage(playerid,COLOR_GREY,"You have been teleported to Grove Street HQ ( LS ).");
            
SetPlayerInterior(playerid,0);
        }
        else{
SendClientMessage(playerid,COLOR_GREY,"You aren't authorized to use this command !");}
    }
    else if(!
strcmp(loc,"lcn",true))
    {
        if(
PlayerInfo[playerid][pAdmin] >=3)
        {
            
SetPlayerPos(playerid,1242.7767,-1699.9156,14.8672);
            
SendClientMessage(playerid,COLOR_GREY,"You have been teleported to La Cosa Nostra HQ ( LS ).");
            
SetPlayerInterior(playerid,0);
        }
        else{
SendClientMessage(playerid,COLOR_GREY,"You aren't authorized to use this command !");}
    }
    else if(!
strcmp(loc,"dmv",true))
    {
        if(
PlayerInfo[playerid][pAdmin] >=|| PlayerInfo[playerid][pHelper] >= 2)
        {
            
SetPlayerPos(playerid,1219.8431,-1812.5302,16.5938);
            
SendClientMessage(playerid,COLOR_GREY,"You have been teleported at D.M.V. ( LS ).");
            
SetPlayerInterior(playerid,0);
        }
        else{
SendClientMessage(playerid,COLOR_GREY,"You aren't authorized to use this command !");}
    }
    else if(!
strcmp(loc,"lsr",true))
    {
        if(
PlayerInfo[playerid][pAdmin] >=3)
        {
            
SetPlayerPos(playerid,1153.9905,-1180.7914,32.8187);
            
SendClientMessage(playerid,COLOR_GREY,"You have been teleported to Rifa HQ ( LS ).");
            
SetPlayerInterior(playerid,0);
        }
        else{
SendClientMessage(playerid,COLOR_GREY,"You aren't authorized to use this command !");}
    }
    else if(!
strcmp(loc,"zip",true))
    {
        if(
PlayerInfo[playerid][pAdmin] >=|| PlayerInfo[playerid][pHelper] >=3)
        {
            
SetPlayerPos(playerid,1456.8652,-1138.1532,23.9784);
            
SendClientMessage(playerid,COLOR_GREY,"You have been teleportez to Z.I.P clothes store. ( LS )");
            
SetPlayerInterior(playerid,0);
        }
        else{
SendClientMessage(playerid,COLOR_GREY,"You aren't authorized to use this command !");}
    }
    else if(!
strcmp(loc,"prolaps",true))
    {
        if(
PlayerInfo[playerid][pAdmin] >= || PlayerInfo[playerid][pHelper] >= 3)
        {
            
SetPlayerPos(playerid,499.8825,-1359.6196,16.2833);
            
SendClientMessage(playerid,COLOR_GREY,"You have been teleported to Pro Laps clothes store. ( LS )");
            
SetPlayerInterior(playerid,0);
        }
        else{
SendClientMessage(playerid,COLOR_GREY,"You aren't authorized to use this command");}
    }
    else if(!
strcmp(loc,"binco",true))
    {
        if(
PlayerInfo[playerid][pAdmin] >= || PlayerInfo[playerid][pHelper] >=3)
        {
            
SetPlayerPos(playerid,2244.4204,-1665.2013,15.4766);
            
SendClientMessage(playerid,COLOR_GREY,"You have been teleported to Binco clothes store. ( LS )");
            
SetPlayerInterior(playerid,0);
        }
        else{
SendClientMessage(playerid,COLOR_GREY,"You aren't authorized to use this command !");}
    }
    return 
1;

Reply
#2

I saw something maybe cuz of that it will crash

i saw this :
PHP код:
else{SendClientMessage(playerid,COLOR_GREY,"you aren't authorized to use this command");} 
i know maybe it works but
change it to this :

PHP код:
else SendClientMessage(playerid,COLOR_GREY,"you aren't authorized to use this command"); 
Reply
#3

Quote:
Originally Posted by amirab
Посмотреть сообщение
I saw something maybe cuz of that it will crash

i saw this :
PHP код:
else{SendClientMessage(playerid,COLOR_GREY,"you aren't authorized to use this command");} 
i know maybe it works but
change it to this :

PHP код:
else SendClientMessage(playerid,COLOR_GREY,"you aren't authorized to use this command"); 
try reverting it back once! and lemme know!
Reply
#4

I've tried but still crashing...
Reply
#5

It compiles perfectly fine for me. The problem must be elsewhere.
Reply
#6

I found the problem on a global variable... tnx for everyone who helped me
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)