SA-MP Forums Archive
Errors. - 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: Errors. (/showthread.php?tid=656244)



Errors. - Dangjai - 11.07.2018

pawn Код:
E:\New folder\New folder\pawno\include\SSGANG\Core\Gangs\GangData.pwn(32) : error 018: initialization data exceeds declared size
E:\New folder\New folder\pawno\include\SSGANG\Database\SQLite\Commands\DBGangcmds.pwn(122) : error 035: argument type mismatch (argument 1)
E:\New folder\New folder\pawno\include\SSGANG\Database\SQLite\Commands\DBGangcmds.pwn(146) : error 035: argument type mismatch (argument 1)
E:\New folder\New folder\pawno\include\SSGANG\Database\SQLite\Commands\DBGangcmds.pwn(261) : error 035: argument type mismatch (argument 1)
pawn Код:
if(sscanf(params,"u",giveid)) return SendClientMessage(playerid,-1,""RED"Error:"GREY"/demote playerid");
pawn Код:
if(sscanf(params,"u",giveid)) return SendClientMessage(playerid,-1,""RED"Error:"GREY"/setleader playerid");
pawn Код:
if(sscanf(params,"u",giveid))
        return SendClientMessage(playerid,-1,""RED"ERROR:"GREY"/gkick playerid");
what the problem?

pawn Код:
new
    GInfo[MAX_PLAYERS][G_USER_DATA],
    Iterator:WarArenas<MAX_GANG_WARS>,
    bool:ActiveWar[MAX_GANG_WARS];
> first one in errors.


Re: Errors. - Tass007 - 11.07.2018

For the sscanf, make sure that you're defining the colors like this.
PHP код:
#define COL_RED             "{FF002B}" 
Because SendClientMessage doesn't read HEX.

For example:
PHP код:
#define COL_RED             "{FF002B}"
#define COL_BROWN           "{6B3F34}"
if(sscanf(params,"u",giveid)) return SendClientMessage(playerid, -1,""COL_RED"Error:"COL_BROWN"/demote playerid"); 
With
Код:
E:\New folder\New folder\pawno\include\SSGANG\Core\Gangs\GangData.pwn(32) : error 018: initialization data exceeds declared size
What line exactly has the error and where are you using it?


Re: Errors. - Dangjai - 11.07.2018

Quote:
Originally Posted by Tass007
Посмотреть сообщение
For the sscanf, make sure that you're defining the colors like this.
PHP код:
#define COL_RED             "{FF002B}" 
Because SendClientMessage doesn't read HEX.

For example:
PHP код:
#define COL_RED             "{FF002B}"
#define COL_BROWN           "{6B3F34}"
if(sscanf(params,"u",giveid)) return SendClientMessage(playerid, -1,""COL_RED"Error:"COL_BROWN"/demote playerid"); 
With
Код:
E:\New folder\New folder\pawno\include\SSGANG\Core\Gangs\GangData.pwn(32) : error 018: initialization data exceeds declared size
What line exactly has the error and where are you using it?
pawn Код:
new
    GInfo[MAX_PLAYERS][G_USER_DATA],
    Iterator:WarArenas<MAX_GANG_WARS>,
    bool:ActiveWar[MAX_GANG_WARS];



Re: Errors. - Dangjai - 11.07.2018

Quote:
Originally Posted by Tass007
Посмотреть сообщение
For the sscanf, make sure that you're defining the colors like this.
PHP код:
#define COL_RED             "{FF002B}" 
Because SendClientMessage doesn't read HEX.

For example:
PHP код:
#define COL_RED             "{FF002B}"
#define COL_BROWN           "{6B3F34}"
if(sscanf(params,"u",giveid)) return SendClientMessage(playerid, -1,""COL_RED"Error:"COL_BROWN"/demote playerid"); 
same errors. and got it on top.


Re: Errors. - Tass007 - 11.07.2018

I need the specific line. Not three.

Well then that's not the correct line, that works fine in my script.


Re: Errors. - Dangjai - 11.07.2018

PHP код:
E:\New folder\New folder\pawno\include\SSGANG\Core\Gangs\GangData.pwn(32) : error 018initialization data exceeds declared size
E
:\New folder\New folder\pawno\include\SSGANG\Database\SQLite\Commands\DBGangcmds.pwn(122) : error 035argument type mismatch (argument 1)
E:\New folder\New folder\pawno\include\SSGANG\Database\SQLite\Commands\DBGangcmds.pwn(146) : error 035argument type mismatch (argument 1)
E:\New folder\New folder\pawno\include\SSGANG\Database\SQLite\Commands\DBGangcmds.pwn(261) : error 035argument type mismatch (argument 1)
E:\New folder\New folder\pawno\include\SSGANG\Core\Gangs\GCmds.pwn(51) : error 035argument type mismatch (argument 1)
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase 
It's the same lines i gave you.


Re: Errors. - Tass007 - 11.07.2018

With this error.
Код:
E:\New folder\New folder\pawno\include\SSGANG\Core\Gangs\GangData.pwn(32) : error 018: initialization data exceeds declared size
You're giving me four different linessss.

Код:
new 
	GInfo[MAX_PLAYERS][G_USER_DATA],
	Iterator:WarArenas<MAX_GANG_WARS>,
    bool:ActiveWar[MAX_GANG_WARS];
What one is it?


Re: Errors. - Dangjai - 11.07.2018

Quote:
Originally Posted by Tass007
Посмотреть сообщение
With this error.
Код:
E:\New folder\New folder\pawno\include\SSGANG\Core\Gangs\GangData.pwn(32) : error 018: initialization data exceeds declared size
You're giving me four different linessss.

Код:
new 
	GInfo[MAX_PLAYERS][G_USER_DATA],
	Iterator:WarArenas<MAX_GANG_WARS>,
    bool:ActiveWar[MAX_GANG_WARS];
What one is it?
PHP код:
    Iterator:WarArenas<MAX_GANG_WARS>, 
is
PHP код:
[code]E:\New folder\New folder\pawno\include\SSGANG\Core\Gangs\GangData.pwn(32) : error 018initialization data exceeds declared size[/code
Код:
E:\New folder\New folder\pawno\include\SSGANG\Database\SQLite\Commands\DBGangcmds.pwn(122) : error 035: argument type mismatch (argument 1)
->
PHP код:
 if(sscanf(params,"u",giveid)) return SendClientMessage(playerid,-1,""RED"Error:"GREY"/setleader playerid"); 
Код:
E:\New folder\New folder\pawno\include\SSGANG\Database\SQLite\Commands\DBGangcmds.pwn(146) : error 035: argument type mismatch (argument 1)
->
PHP код:
if(sscanf(params,"u",giveid)) return SendClientMessage(playerid,-1,""CD_RED"Error:"GREY"/demote playerid"); 
Код:
E:\New folder\New folder\pawno\include\SSGANG\Database\SQLite\Commands\DBGangcmds.pwn(261) : error 035: argument type mismatch (argument 1)
->
PHP код:
 if(sscanf(params,"u",giveid))
        return 
SendClientMessage(playerid,-1,""RED"ERROR:"GREY"/gkick playerid"); 

Код:
E:\New folder\New folder\pawno\include\SSGANG\Core\Gangs\GCmds.pwn(51) : error 035: argument type mismatch (argument 1)
->
PHP код:
 if(sscanf(params,"u",giveid)) return SendClientMessage(playerid,-1,""RED"Error:"GREY"/ginvite playerid"); 



Re: Errors. - Florin48 - 11.07.2018

SendClientMessage(playerid,-1,"{ff0000}ERROR:{D6CDCB}/gkick playerid");

to all who are the same put the code there to be sure there is no error, instead of color names to put their code


Re: Errors. - Dangjai - 11.07.2018

Thanks fixed.