[Tutorial] How to make teams
#21

Quote:
Originally Posted by sammp
View Post
Right on Kwarde,

He shouldn't be writing tutorials if he is unsure as to what he is doing.....
unsure? lol i pretty tested it by my self and it worked.
Reply
#22

Quote:
Originally Posted by Stuun
View Post
unsure? lol i pretty tested it by my self and it worked.
Have you read my post on page 2? Because that what you provided to us can't work. It's most likely that you did write a proper script with that testing, but what you provided us will not work.

Quote:

But i remember once i used without it and it still worked..

Again, perhaps you did test it but I'm 200% sure you didn't write something like this:

pawn Code:
#include <a_samp>

#define TEAM_TEST 0

public OnPlayerConnect(playerid)
{
    case 1..5:
    {
        SetPlayerTeam(playerid, TEAM_TEST);
    }
    return 1;
}
Don't say again it will work, because it won't. This simply is not a valid code. The script can't handle "cases" without a switch statement.

Here, just tested it once again to make doubly sure that what I say is true:
Quote:
Originally Posted by PAWN Compiler
C:\Users\Kevin\Desktop\SAMP\#M3SA\filterscripts\tm p.pwn(7) : error 014: invalid statement; not in switch
C:\Users\Kevin\Desktop\SAMP\#M3SA\filterscripts\tm p.pwn(7) : warning 215: expression has no effect
C:\Users\Kevin\Desktop\SAMP\#M3SA\filterscripts\tm p.pwn(7) : error 001: expected token: ";", but found ".."
C:\Users\Kevin\Desktop\SAMP\#M3SA\filterscripts\tm p.pwn(7) : error 029: invalid expression, assumed zero
C:\Users\Kevin\Desktop\SAMP\#M3SA\filterscripts\tm p.pwn(7) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Also, you didn't add an ID to TEAM_TEST (I refer you to my previous post again), doing this:
pawn Code:
#include <a_samp>

#define TEAM_TEST

public OnPlayerConnect(playerid)
{
    SetPlayerTeam(playerid, TEAM_TEST);
    return 1;
}
will give these errors:
Quote:
Originally Posted by PAWN Compiler
C:\Users\Kevin\Desktop\SAMP\#M3SA\filterscripts\tm p.pwn(7) : error 029: invalid expression, assumed zero
C:\Users\Kevin\Desktop\SAMP\#M3SA\filterscripts\tm p.pwn(7) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Quote:
Originally Posted by Stuun
View Post
And how to add more teams? i think i explained it well -.-

Just define it under it i mean #define TEAM_yourteamname.
I posted that to see if you would know about those IDs. But since you didn't tell to add those IDs (which is really important - again, see my last post on page 2), it wouldn't work. Also, by adding just a define, a whole team won't be added! You should also add more classes etc (if you want to put people in teams that way).
Reply
#23

Ah wait, i admit i forgot that switch(GetPlayerTeam(playerid)){

Exepct that everything is ok.
Reply
#24

Please Edit your whole tutorial for the sake of newbies
and read some team tutorial references
Reply
#25

Quote:
Originally Posted by Stuun
View Post
Ah wait, i admit i forgot that switch(GetPlayerTeam(playerid)){

Exepct that everything is ok.
No it is not! Did you even read the part about the macros (the defines) (you know, my previous two posts)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)