SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 22/04/2017, 03:26 PM   #1
asafasaf
Little Clucker
 
Join Date: Apr 2017
Posts: 25
Reputation: 0
Default I`m getting a strange error, please help me

this is the error:
error 035: argument type mismatch (argument 1)
the command:

PHP Code:
    if(!strcmp(cmd"/ClanColor"true))    {
        
format(ClanFilesizeof(ClanFile), "Players/Clans/%d.txt",CNameByID(DOF2_GetString(PClanFile(playerid),"Clan")));
         if(
DOF2_GetInt(PClanFile(playerid),"InClan") == 0) return SendClientMessage(playerid,COLOR_RED".אתה לא נמצא בקלאן");
         if(
DOF2_GetInt(PClanFile(playerid),"ClanLevel") < 5) return SendClientMessage(playerid,COLOR_RED".שינוי צבע לקלאן זמין רק למייסד הקלאן");
         
tmp strtok(cmdtextidx);
        
tmp1 strtok(cmdtextidx);
        
cmd strtok(cmdtextidx);
        new 
ClanColorRClanColorGClanColorB;
        if(!
strlen(tmp)) return SendClientMessage(playeridCOLOR_WHITE"/Clan Color [R] [G] [B] :צורת שימוש");
        if(!
strlen(tmp1)) return SendClientMessage(playeridCOLOR_WHITE"/Clan Color [R] [G] [B] :צורת שימוש");
        if(!
strlen(cmd)) return SendClientMessage(playeridCOLOR_WHITE"/Clan Color [R] [G] [B] :צורת שימוש");
        
ClanColorR strval(tmp);
        
ClanColorG strval(tmp1);
        
ClanColorB strval(cmd);
        
format(ClanFilesizeof (ClanFile), "Players/Clans/%s.ini"DOF2_GetInt(PClanFile(playerid), "Clan"));
        
DOF2_SetInt(ClanFile,"ClanColorR",ClanColorR);
        
DOF2_SetInt(ClanFile,"ClanColorG",ClanColorG);
        
DOF2_SetInt(ClanFile,"ClanColorB",ClanColorB);
        
SendClientMessage(playeridrgba2hex(ClanColorR,ClanColorG,ClanColorB,0), ".צבע הקלאן שונה לצבע הודעה זו");
           for(new 
0MAX_PLAYERSi++)
        {
            if(!
strcmp(DOF2_GetInt(PClanFile(playerid), "Clan"), DOF2_GetInt(PClanFile(i), "Clan"), true)) // the error is in this line
            
{
                    
SetPlayerColor(irgba2hex(ClanColorR,ClanColorG,ClanColorB,0));
             }
        }
        return 
1;
    } 
thank you and sorry about my bad english

Last edited by asafasaf; 22/04/2017 at 04:25 PM.
asafasaf is offline   Reply With Quote
Old 22/04/2017, 03:39 PM   #2
Ertouq
Huge Clucker
 
Ertouq's Avatar
 
Join Date: Jul 2014
Posts: 235
Reputation: 4
Default Respuesta: I`m getting a strange error, please help me

Please put [ php ] (no space) at the beginning of the text, and [ /php ] (no space) at the end of the text so that it can read well
Ertouq is offline   Reply With Quote
Old 22/04/2017, 04:27 PM   #3
asafasaf
Little Clucker
 
Join Date: Apr 2017
Posts: 25
Reputation: 0
Default Re: Respuesta: I`m getting a strange error, please help me

Quote:
Originally Posted by Ertouq View Post
Please put [ php ] (no space) at the beginning of the text, and [ /php ] (no space) at the end of the text so that it can read well
done.
can you help me please?
asafasaf is offline   Reply With Quote
Old 22/04/2017, 04:32 PM   #4
khRamin78
Huge Clucker
 
khRamin78's Avatar
 
Join Date: Jun 2015
Location: IRI/LA
Posts: 321
Reputation: 30
Default Re: I`m getting a strange error, please help me

format(ClanFile, sizeof(ClanFile), "Players/Clans/%d.txt",CNameByID(DOF2_GetString(PClanFile(playeri d),"Clan")));

format(ClanFile, sizeof (ClanFile), "Players/Clans/%s.ini", DOF2_GetInt(PClanFile(playerid), "Clan"));

can u tell me what are these ? u cant define 2x strings in one string what is "clan" part ?
khRamin78 is offline   Reply With Quote
Old 22/04/2017, 04:39 PM   #5
asafasaf
Little Clucker
 
Join Date: Apr 2017
Posts: 25
Reputation: 0
Default Re: I`m getting a strange error, please help me

Quote:
Originally Posted by khRamin78 View Post
format(ClanFile, sizeof(ClanFile), "Players/Clans/%d.txt",CNameByID(DOF2_GetString(PClanFile(playeri d),"Clan")));

format(ClanFile, sizeof (ClanFile), "Players/Clans/%s.ini", DOF2_GetInt(PClanFile(playerid), "Clan"));

can u tell me what are these ? u cant define 2x strings in one string what is "clan" part ?
"Clans" is a part in %s.ini
asafasaf is offline   Reply With Quote
Old 22/04/2017, 05:08 PM   #6
asafasaf
Little Clucker
 
Join Date: Apr 2017
Posts: 25
Reputation: 0
Default Re: I`m getting a strange error, please help me

UP
Please help me...
i`m really want to compile the mode...
asafasaf is offline   Reply With Quote
Old 23/04/2017, 02:39 PM   #7
asafasaf
Little Clucker
 
Join Date: Apr 2017
Posts: 25
Reputation: 0
Default Re: I`m getting a strange error, please help me

UP...
asafasaf is offline   Reply With Quote
Old 23/04/2017, 02:50 PM   #8
Toroi
Gangsta
 
Toroi's Avatar
 
Join Date: Feb 2017
Location: Venezuela
Posts: 693
Reputation: 146
Default Re: I`m getting a strange error, please help me

If they are integer values you don't need to use strcmp

PHP Code:
if(DOF2_GetInt(PClanFile(playerid), "Clan") == DOF2_GetInt(PClanFile(i), "Clan")) 
__________________
Scripting Help in a nutshell

Quote:
Originally Posted by Thanks View Post
So.. hey everyone im trying to searching at ****** how to make leaderboard with Textdraws so i find many but Not in my brain...
Toroi is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange Error -Shifty- Scripting Help 2 07/02/2013 07:01 PM
Strange Error. Shouty Scripting Help 11 06/02/2013 12:33 PM
Strange Error Stefan_Merce Scripting Help 9 12/01/2013 05:40 PM
Strange Error? [REP+] seanny Scripting Help 3 16/01/2012 07:58 PM


All times are GMT. The time now is 07:53 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.