SA-MP Forums Archive
commands.inc - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: commands.inc (/showthread.php?tid=200087)



commands.inc - sjvt - 17.12.2010

I did made my commands in commands.inc but when i do it it give a error

pawn Код:
C:\Documents and Settings\Gebruiker\Bureaublad\ProjectRP\pawno\include\commands.inc(1) : error 010: invalid function or declaration
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
and when i make all my commands in my gamemode it give no error ? does some know what i did wrong?


Re: commands.inc - Zh3r0 - 17.12.2010

Show us your include? Maybe? Pff...


Re: commands.inc - Mehtab - 17.12.2010

post your code


Re: commands.inc - sjvt - 17.12.2010

You mean line 1? If i need to post the whole include i spam the forum because its 7547 lines

//Things that need for line 1.
Line 1:
//In commands.inc
pawn Код:
new USERPW "steef"
//In Gamemode
pawn Код:
if(!strcmp(string1x, userpw, true))
{
    playervar[playerid] = 1;
    return 1;
}

//Other
pawn Код:
CMD:checkvar(playerid, params[])
{
    if (playervar[playerid] > 0)
    {
        playervarx = 9999;
        playervar[playerid] = 0;
    }
}



Re: commands.inc - PowerPC603 - 17.12.2010

pawn Код:
new USERPW[6] = "steef"
You were setting a string into an integer variable, and you forgot the equal sign.


Re: commands.inc - [03]Garsino - 17.12.2010

pawn Код:
new USERPW[6] = "steef";
You forgot the ;


Re: commands.inc - sjvt - 17.12.2010

friend of me did say the same thing, but it gives the same error.


Re: commands.inc - sjvt - 17.12.2010

so what is the problem


Re: commands.inc - sjvt - 18.12.2010

bump


Re: commands.inc - sjvt - 18.12.2010

bumpiebumpie;d


Re: commands.inc - Mean - 18.12.2010

Don't bump, I guess you just forgot ;


Re: commands.inc - XePloiT - 18.12.2010

i think maybe you wanted to do define?...
instead of new USERPW "steef"
try #define USERPW "steef"


Re: commands.inc - sjvt - 18.12.2010

Omg, i did already

#define USERPW[6] 'Steef'; doesnt work!


Quote:
Originally Posted by [03]Garsino
Посмотреть сообщение
pawn Код:
new USERPW[6] = "steef";
You forgot the ;
friend of me did say the same thing, but it gives the same error.


Re: commands.inc - sjvt - 20.12.2010

bThe message you have entered is too short. Please lengthen your message to at least 4 characters.


Re: commands.inc - sjvt - 21.12.2010

bump


Re: commands.inc - IstuntmanI - 21.12.2010

Replace
Код:
new USERPW steef
with
Код:
#define USERPW steef
and if say "userpw" isn't defined, or something like this, replace
Код:
#define USERPW steef
with
Код:
#define userpw steef



Re: commands.inc - sjvt - 21.12.2010

I did made my commands in commands.inc but when i do it it give a error

pawn Код:
C:\Documents and Settings\Gebruiker\Bureaublad\ProjectRP\pawno\include\commands.inc(1) : error 010: invalid function or declaration
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
and when i make all my commands in my gamemode it give no error ? does some know what i did wrong?


//Things that need for line 1.
Line 1:
//In commands.inc
pawn Код:
new USERPW "steef"
//In Gamemode
pawn Код:
if(!strcmp(string1x, userpw, true))
{
    playervar[playerid] = 1;
    return 1;
}

//Other
pawn Код:
CMD:checkvar(playerid, params[])
{
    if (playervar[playerid] > 0)
    {
        playervarx = 9999;
        playervar[playerid] = 0;
    }
}
I did try this, but it doesnt work.
pawn Код:
new USERPW[6] ''Password'';
and this
pawn Код:
#define USERPW[6] 'Steef';



Re: commands.inc - Nero_3D - 22.12.2010

FALSE
Quote:
Originally Posted by sjvt
Посмотреть сообщение
pawn Код:
new USERPW "steef"
pawn Код:
new USERPW[6] ''Password'';
CORRECT
Quote:
Originally Posted by [03]Garsino
Посмотреть сообщение
pawn Код:
new USERPW[6] = "steef";
FALSE
Quote:
Originally Posted by sjvt
Посмотреть сообщение
pawn Код:
#define USERPW[6] 'Steef';
CORRECT
Quote:
Originally Posted by XePloiT
Посмотреть сообщение
pawn Код:
#define USERPW "steef"
And whats the matter with the checkvar command ?


Re: commands.inc - sjvt - 22.12.2010

oh sorry, i have that what you said. and still not working