#1

when i try to compile i get 'Pawn Compiler libary Has Stopped Working'

pawn Код:
CMD:lotto(playerid, params[]);
{      
new rand = random(sizeof(LN));
        new number;
        if(sscanf(params,"i", number)) return SendClientMessage(playerid, 0xFF0000AA, "/snw [1-10]");
        else if ( number > 10 || number < 1) return SendClientMessage(playerid, 0xFF0000AA, "choose a number From 1-10");
        else if (number <> LN [rand][rand]) return SendClientMessage(playerid, 0xFF0000AA, "You Lost");    
        else if (number == LN [rand][rand]) return SendClientMessage(playerid, 0x33AA33AA, "You won it!!");    
        GivePlayerMoney(playerid, 1000000);
        return 1;
    }
this is the one i have scripted i was testing 2d array in /lotto , it dont have any MySql things, here is my include

pawn Код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>
Reply
#2

Yes this happend many times, when you got much errors pawno cannot read it i think and it appears "Pawno has stopped working"
Or maybe you got missing brackets, this happend to me many times
You can use Bracket Fixer from here: https://sampforum.blast.hk/showthread.php?tid=171429
Reply
#3

pawn Код:
CMD:lotto(playerid, params[]);
{
    new rand = random(sizeof(LN));
    new number;
   
    if(sscanf(params,"i", number)) return SendClientMessage(playerid, 0xFF0000AA, "/snw [1-10]");
    else if ( number > 10 || number < 1) return SendClientMessage(playerid, 0xFF0000AA, "choose a number From 1-10");
    else if (number <> LN [rand][rand]) return SendClientMessage(playerid, 0xFF0000AA, "You Lost");
    else if (number == LN [rand][rand]) return SendClientMessage(playerid, 0x33AA33AA, "You won it!!");
    GivePlayerMoney(playerid, 1000000);
    return 1;
}
Reply
#4

Fail
Reply
#5

pawn Код:
CMD:lotto(playerid, params[])//You dont need a semicolon here
{
    new rand = random(sizeof(LN));
    new number;
   
    if(sscanf(params,"i", number)) return SendClientMessage(playerid, 0xFF0000AA, "/snw [1-10]");
    else if ( number > 10 || number < 1) return SendClientMessage(playerid, 0xFF0000AA, "choose a number From 1-10");
    else if (number <> LN [rand][rand]) return SendClientMessage(playerid, 0xFF0000AA, "You Lost");
    else if (number == LN [rand][rand]) return SendClientMessage(playerid, 0x33AA33AA, "You won it!!");
    GivePlayerMoney(playerid, 1000000);
    return 1;
}
Try it now.
Reply if it works or doesn't.

OR try this
pawn Код:
CMD:lotto(playerid, params[])
{
    new rand = random(sizeof(LN));
    new number;
   
    if(sscanf(params,"i", number)) return SendClientMessage(playerid, 0xFF0000AA, "/snw [1-10]");
    else if ( number > 10 || number < 1) return SendClientMessage(playerid, 0xFF0000AA, "choose a number From 1-10");
    else if (number <> LN [rand][rand]) return SendClientMessage(playerid, 0xFF0000AA, "You Lost");
    else if (number == LN [rand][rand])
    {
    SendClientMessage(playerid, 0x33AA33AA, "You won it!!");
    GivePlayerMoney(playerid, 1000000);
    }
    return 1;
}
Sorry about the indentation. Can't help it.
Reply
#6

Quote:
Originally Posted by kingofdemons
Посмотреть сообщение
pawn Код:
CMD:lotto(playerid, params[])//You dont need a semicolon here
{
    new rand = random(sizeof(LN));
    new number;
   
    if(sscanf(params,"i", number)) return SendClientMessage(playerid, 0xFF0000AA, "/snw [1-10]");
    else if ( number > 10 || number < 1) return SendClientMessage(playerid, 0xFF0000AA, "choose a number From 1-10");
    else if (number <> LN [rand][rand]) return SendClientMessage(playerid, 0xFF0000AA, "You Lost");
    else if (number == LN [rand][rand]) return SendClientMessage(playerid, 0x33AA33AA, "You won it!!");
    GivePlayerMoney(playerid, 1000000);
    return 1;
}
Try it now.
Reply if it works or doesn't.

OR try this
pawn Код:
CMD:lotto(playerid, params[])
{
    new rand = random(sizeof(LN));
    new number;
   
    if(sscanf(params,"i", number)) return SendClientMessage(playerid, 0xFF0000AA, "/snw [1-10]");
    else if ( number > 10 || number < 1) return SendClientMessage(playerid, 0xFF0000AA, "choose a number From 1-10");
    else if (number <> LN [rand][rand]) return SendClientMessage(playerid, 0xFF0000AA, "You Lost");
    else if (number == LN [rand][rand])
    {
    SendClientMessage(playerid, 0x33AA33AA, "You won it!!");
    GivePlayerMoney(playerid, 1000000);
    }
    return 1;
}
Sorry about the indentation. Can't help it.
first one should work.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)