Compile 26 Error with an LA-RP edit
#1

Hello ,
Please help me with this error
Ps: i think that the first error caused the others.
Код:
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(25115) : error 021: symbol already defined: "strtok"
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(25130) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(26655) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(26715) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(26768) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(27436) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(27495) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28176) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28204) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28215) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28275) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28544) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28571) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28601) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28609) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28643) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28651) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28684) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28729) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28792) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28850) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28858) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28893) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28901) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(29128) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(29182) : error 047: array sizes do not match, or destination array is too small

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


26 Errors.
Line 25115 to Line 29182
http://pastebin.com/BSDQCzdf
Thanks for help!



EDIT:SOLVED, TRY THE NEWEST GAMEMODE EDIT BY N0Fear , Thanks To Him
Reply
#2

No help? okay.
Reply
#3

PHP код:
strtok(const string[], &index)
{
    new 
length strlen(string);
    while ((
index length) && (string[index] <= ' '))
    {
        
index++;
    }
 
    new 
offset index;
    new 
result[20];
    while ((
index length) && (string[index] > ' ') && ((index offset) < (sizeof(result) - 1)))
    {
        
result[index offset] = string[index];
        
index++;
    }
    
result[index offset] = EOS;
    return 
result;

Remove this, compile and post the errors.
Reply
#4

Код:
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(26635) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(26695) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(26748) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(27416) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(27475) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28156) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28184) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28195) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28255) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28524) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28551) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28581) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28589) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28623) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28631) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28664) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28709) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28772) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28830) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28838) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28873) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(28881) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(29108) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(29162) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(29215) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Youssef\Bureau\LARP\Gamemodes\larp.pwn(29527) : error 047: array sizes do not match, or destination array is too small

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


26 Errors.
Thanks for reply
Reply
#5

Can you show me which line is 26635?
Reply
#6

Quote:
Originally Posted by ATGOggy
Посмотреть сообщение
Can you show me which line is 26635?
PHP код:
[26634]     new pveh GetVehicleModel(GetPlayerVehicleID(playerid));
[
26635]    cmd strtok(cmdtextidx);
[
26636]    GetPlayerName(playeridsendernamesizeof(sendername)); 
Reply
#7

Add this line to the top of OnPlayerRegister:
PHP код:
new cmd[256], tmp[256]; 
Reply
#8

Quote:
Originally Posted by ATGOggy
Посмотреть сообщение
Add this line to the top of OnPlayerRegister:
PHP код:
new cmd[256], tmp[256]; 
In :
PHP код:
forward OnPlayerRegister(playeridpassword[]); 
?
Or :
PHP код:
        if(dialogid == 1246)
        {
            if(
response == 1)
            {
                if(
strlen(inputtext) < 3)
                {
                    
ShowPlayerDialog(playerid1246DIALOG_STYLE_INPUT,"Try Again, Please Register","The password entered is Too Short!\nType your password below to register a new account.","Register","Quit");
                    return 
1;
                }
                if(
strlen(inputtext) > 20)
                {
                    
ShowPlayerDialog(playerid1246DIALOG_STYLE_INPUT,"Try Again, Please Register","The password entered is too Long!\nType your password below to register a new account.","Register","Quit");
                    return 
1;
                }
                
OnPlayerRegister(playeridinputtext);
            }
            else
            {
                
Kick(playerid); 
Reply
#9

When your gamemode needs to add numbers use "dini_IntSet"
When your gm needs to add words use "dUserSet"
Reply
#10

In public OnPlayerRegister(playerid, password[])

Like this:
PHP код:
public OnPlayerRegister(playeridpassword[])
{
    new 
cmd[256], tmp[256];
    
blah blah blah 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)