Help Please What is wrong
#1

Код:
#define MINUTES 10 // 10 Minutes.
#define MILISECONDS MINUTES * 60

new
    RegisterTime[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
 RegisterTime[playerid] = gettime() + MILISECONDS;
return 1; 
}
CMD:register(playerid, params[])
{
    if(RegisterTime[playerid] >= gettime())
    {
        new Str[128]; format(Str, 128, "REGISTER: You are no able to use this command at this point. Wait %d seconds.", RegisterTime[playerid] - gettime());
        return SendClientMessage(playerid, -1, Str);
    }
       new string [ 300 ];
    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);

    new pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, sizeof(pName));

    format(string, sizeof(string), ""COL_WHITE"{0066FF}BilluGang Cops And Robbers\n\n{999999}New Registration\n{FFFFFF}Nick:{0099FF}%s\n\n{FFFFFF}Do {FF0000}Not {FFFFFF}Register Multiple Accounts\n{FFFFFF}Do {FF0000}Not {FFFFFF}Use The Game Password That You Use Elsewhere\n\nPlease {FFFF66}Enter Your Password {FFFFFF}For Your Account:", pName);
    ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"{FFFFFF}CnR {FFFFFF}Registration", string, "Register", "Cancel");
}
What Is Wrong Getting Errors
Код:
C:\Users\Anurag\Desktop\Most Wanted Cops and Robbers v1.1\gamemodes\MWCNR.pwn(5) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Anurag\Desktop\Most Wanted Cops and Robbers v1.1\gamemodes\MWCNR.pwn(5) : error 009: invalid array size (negative, zero or out of bounds)
Error Line
Код:
new
    RegisterTime[MAX_PLAYERS];
Reply
#2

Place on top of your script #define MAX_PLAYERS 50 or #define MAX_PLAYERS 100 or how much you want...
Reply
#3

Why 50 or 100 what they do
Reply
#4

Quote:
Originally Posted by CarRamper
Посмотреть сообщение
Why 50 or 100 what they do
Those are the player slots...
Reply
#5

You can place 1000 if you want...
I just wrote 50 and 100 as example...
Reply
#6

Did you forget to put
Код:
#include <a_samp>
on top of your script?
Reply
#7

Quote:
Originally Posted by Sithis
Посмотреть сообщение
Did you forget to put
Код:
#include <a_samp>
on top of your script?
This got to be a joke? How do you think he'd forget that? Infact, It would had given alot more errors than this.
Reply
#8

You might have also undefined your MAX_PLAYERS but forgot to redefine it.
Reply
#9

Quote:
Originally Posted by Meller
Посмотреть сообщение
This got to be a joke? How do you think he'd forget that? Infact, It would had given alot more errors than this.
Do I look like a joke to you? I'm just double checking because from the looks of it, this guy has done some basic stuff wrong. But then again, I provided help while you only filled this topic with trash
Reply
#10

Quote:
Originally Posted by Meller
Посмотреть сообщение
This got to be a joke? How do you think he'd forget that? Infact, It would had given alot more errors than this.
Actually Sithis is probably right.
The error is on the 5th line ('(5)'), and if you could the lines the player posted, you'd find that MAX_PLAYERS is on the 5th line too, so that's his whole script.

Which means, he hasn't included a_samp.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)