SA-MP Forums Archive
What can i do here - 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)
+--- Thread: What can i do here (/showthread.php?tid=640597)



What can i do here - Jaua10 - 04.09.2017

Код:
C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\Nuevo.pwn(315) : error 035: argument type mismatch (argument 2)
C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\Nuevo.pwn(323) : error 035: argument type mismatch (argument 2)
C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\Nuevo.pwn(326) : warning 225: unreachable code
C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\Nuevo.pwn(967) : warning 203: symbol is never used: "IsNumeric"
C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\Nuevo.pwn(967) : warning 203: symbol is never used: "ReturnUser"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
PHP код:
public OnPlayerConnect(playerid)
{
    new 
gPlayerAccount[MAX_PLAYERS];
    new 
plname[MAX_PLAYER_NAME];
    new 
string[MAX_PLAYER_NAME];
    
//gPlayerLogged[playerid] = 0; gPlayerLogTries[playerid] = 0; gPlayerAccount[playerid] = 0;
    //gPlayerSpawned[playerid] = 0; PlayerKarting[playerid] = 0; PlayerInKart[playerid] = 0;
    
format(stringsizeof(string), "Users/%s.ini"plname);
    if(
fexist(string))
    {
        
gPlayerAccount[playerid] = 1;
        
SendClientMessage(playeridCOLOR_YELLOW"SERVER: That nick is registered, please log in");
        
SendClientMessage(playeridCOLOR_LIGHTRED"NOTE: You MUST log in before spawning!");
        return 
1;
    }
    else
    {
        
gPlayerAccount[playerid] = 0;
        
SendClientMessage(playeridCOLOR_LIGHTRED"NOTE: You MUST register before spawning!");
        
SendClientMessage(playerid,COLOR_YELLOW,"You dont have an account. Please register by using /register [password]");
        return 
1;
    }
    return 
1;

also i dont have the line 967, cna u help me please?


Respuesta: What can i do here - Miguelch1312 - 04.09.2017

Quote:
Originally Posted by Jaua10
Посмотреть сообщение
Код:
C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\Nuevo.pwn(315) : error 035: argument type mismatch (argument 2)
C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\Nuevo.pwn(323) : error 035: argument type mismatch (argument 2)
C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\Nuevo.pwn(326) : warning 225: unreachable code
C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\Nuevo.pwn(967) : warning 203: symbol is never used: "IsNumeric"
C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\Nuevo.pwn(967) : warning 203: symbol is never used: "ReturnUser"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
PHP код:
public OnPlayerConnect(playerid)
{
    new 
gPlayerAccount[MAX_PLAYERS];
    new 
plname[MAX_PLAYER_NAME];
    new 
string[MAX_PLAYER_NAME];
    
//gPlayerLogged[playerid] = 0; gPlayerLogTries[playerid] = 0; gPlayerAccount[playerid] = 0;
    //gPlayerSpawned[playerid] = 0; PlayerKarting[playerid] = 0; PlayerInKart[playerid] = 0;
    
format(stringsizeof(string), "Users/%s.ini"plname);
    if(
fexist(string))
    {
        
gPlayerAccount[playerid] = 1;
        
SendClientMessage(playeridCOLOR_YELLOW"SERVER: That nick is registered, please log in");
        
SendClientMessage(playeridCOLOR_LIGHTRED"NOTE: You MUST log in before spawning!");
        return 
1;
    }
    else
    {
        
gPlayerAccount[playerid] = 0;
        
SendClientMessage(playeridCOLOR_LIGHTRED"NOTE: You MUST register before spawning!");
        
SendClientMessage(playerid,COLOR_YELLOW,"You dont have an account. Please register by using /register [password]");
        return 
1;
    }
    return 
1;

also i dont have the line 967, cna u help me please?
Show the lines 323, 326, 315 and the last 2 warnings i thinks it's because you have the #include<utils> and you're not using it


Re: What can i do here - Jaua10 - 04.09.2017

315

Код HTML:
SendClientMessage(playerid, COLOR_YELLOW, "SERVER: That nick is registered, please log in");
323

Код HTML:
SendClientMessage(playerid,COLOR_YELLOW,"You dont have an account. Please register by using /register [password]");
326

Код HTML:
return 1;



Re: What can i do here - Jaua10 - 04.09.2017

Anyone can help me please?


Re: What can i do here - Paulice - 04.09.2017

Are you sure that code is from Nuevo.pwn?


Re: What can i do here - Jaua10 - 04.09.2017

YES PAL


Re: What can i do here - Paulice - 04.09.2017

COLOR_YELLOW isn't defined or is defined wrong then.


Re: What can i do here - Jaua10 - 04.09.2017

Код HTML:
#define COLOR_YELLOW "{0xFFFF00AA}"



Re: What can i do here - Paulice - 04.09.2017

Yeah, it's defined wrong. Set it to 0xFFFF00AA.


Re: What can i do here - Jaua10 - 04.09.2017

Works, but now:

Код HTML:
C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\Nuevo.pwn(435) : warning 225: unreachable code
C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\Nuevo.pwn(471) : error 017: undefined symbol "cmd"
C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\Nuevo.pwn(479) : error 017: undefined symbol "pMember"
C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\Nuevo.pwn(491) : error 017: undefined symbol "FactionInfo"
C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\Nuevo.pwn(491) : warning 215: expression has no effect
C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\Nuevo.pwn(491) : error 001: expected token: ";", but found "]"
C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\Nuevo.pwn(491) : error 029: invalid expression, assumed zero
C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\Nuevo.pwn(491) : fatal error 107: too many error messages on one line

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


6 Errors.
PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
if(
strcmp(cmd"/factions"true) == 0)
    {
        new 
members_1members_2members_3;
        new 
members_4members_5members_6;
        new 
members_7members_8members_9;
        new 
members_10;
        for(new 
0MAX_PLAYERSi++)
        {
            switch(
PlayerInfo[i][pMember])
            {
                case 
1members_1++;
                case 
2members_2++;
                case 
3members_3++;
                case 
4members_4++;
                case 
5members_5++;
                case 
6members_6++;
                case 
7members_7++;
            }
        }
        
        if(
FactionInfo[1][FactionType] != 6format(stringsizeof(string), "Faction #1: %s | Owner: %s | Online Members: %d | Total Members: %d"FactionEmbed(1), FACTION1_OWNERmembers_1TOTAL_FACTION1_MEMBERS);
        else 
format(stringsizeof(string), "Faction #1: %s | Owner: Classified | Online Members: ? | Total Members: ?"FACTION_1);
         
SendClientMessage(playeridWHITEstring);
        if(
FactionInfo[2][FactionType] != 6format(stringsizeof(string), "Faction #2: %s | Owner: %s | Online Members: %d | Total Members: %d"FactionEmbed(2), FACTION2_OWNERmembers_2TOTAL_FACTION2_MEMBERS);
        else 
format(stringsizeof(string), "Faction #2: %s | Owner: Classified | Online Members: ? | Total Members: ?"FACTION_2);
         
SendClientMessage(playeridWHITEstring);
         if(
FactionInfo[3][FactionType] != 6format(stringsizeof(string), "Faction #3: %s | Owner: %s | Online Members: %d | Total Members: %d"FactionEmbed(3), FACTION3_OWNERmembers_3TOTAL_FACTION3_MEMBERS);
        else 
format(stringsizeof(string), "Faction #3: %s | Owner: Classified | Online Members: ? | Total Members: ?"FACTION_3);
         
SendClientMessage(playeridWHITEstring);
         if(
FactionInfo[4][FactionType] != 6format(stringsizeof(string), "Faction #4: %s | Owner: %s | Online Members: %d | Total Members: %d"FactionEmbed(4), FACTION4_OWNERmembers_4TOTAL_FACTION4_MEMBERS);
        else 
format(stringsizeof(string), "Faction #4: %s | Owner: Classified | Online Members: ? | Total Members: ?"FACTION_4);
         
SendClientMessage(playeridWHITEstring);
        if(
FactionInfo[5][FactionType] != 6format(stringsizeof(string), "Faction #5: %s | Owner: %s | Online Members: %d | Total Members: %d"FactionEmbed(5), FACTION5_OWNERmembers_5TOTAL_FACTION5_MEMBERS);
        else 
format(stringsizeof(string), "Faction #5: %s | Owner: Classified | Online Members: ? | Total Members: ?"FACTION_5);
         
SendClientMessage(playeridWHITEstring);
         if(
FactionInfo[6][FactionType] != 6format(stringsizeof(string), "Faction #6: %s | Owner: %s | Online Members: %d | Total Members: %d"FactionEmbed(6), FACTION6_OWNERmembers_6TOTAL_FACTION6_MEMBERS);
        else 
format(stringsizeof(string), "Faction #6: %s | Owner: Classified | Online Members: ? | Total Members: ?"FACTION_6);
         
SendClientMessage(playeridWHITEstring);
         if(
FactionInfo[7][FactionType] != 6format(stringsizeof(string), "Faction #7: %s | Owner: %s | Online Members: %d | Total Members: %d"FactionEmbed(7), FACTION7_OWNERmembers_7TOTAL_FACTION7_MEMBERS);
        else 
format(stringsizeof(string), "Faction #7: %s | Owner: Classified | Online Members: ? | Total Members: ?"FACTION_7);
         
SendClientMessage(playeridWHITEstring);
         
        return 
1;
    }
    return 
0;