SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 22/05/2020, 06:32 AM   #1
Filbert
Huge Clucker
 
Join Date: May 2016
Posts: 251
Reputation: 1
Default error 035: argument type mismatch (argument 2)

PHP Code:
if(InDM[playerid] == && PlayerInfo[playerid][Color] == 1) {
        new 
colorhex[128];
        switch(
PlayerInfo[playerid][pColor]) {
            case 
1colorhex "0xFF0000AA";
            case 
2colorhex "0x00FFFFAA";
            case 
3colorhex "0xFFFF00AA";
            case 
4colorhex "0x33FF33AA";
            case 
5colorhex "0xFF00FFC8";
            case 
6colorhex "0x2C2727AA";
            case 
7colorhex "0xFFFFFFAA";
        }
        switch(
PlayerInfo[playerid][team]) {
            case 
TEAM_WORKERSetPlayerColor(playerid,colorhex);//<<<Line 21729
            
case TEAM_blablaSetPlayerColor(playerid,colorhex);//<<<Line 21730
            
...
        }

Code:
(21729) : error 035: argument type mismatch (argument 2)
(21730) : error 035: argument type mismatch (argument 2)
...
How to fix this?
Filbert is offline   Reply With Quote
Old 22/05/2020, 06:51 AM   #2
StevenLV
Big Clucker
 
StevenLV's Avatar
 
Join Date: Apr 2017
Location: Pakistan
Posts: 144
Reputation: 11
Default Re: error 035: argument type mismatch (argument 2)

If you search on the wiki for SetPlayerColor:
Quote:
Description:
Set the colour of a player's nametag and marker (radar blip).
Parameters:
(playerid, color)
playerid The ID of the player whose color to set.
color The color to set. Supports alpha values.
It is not a string. Hexadecimal is a number. So use a define maybe or use it as int however you want to.

An advice: When every you egt type mismatch etc so please search for native function to get a clear idea.
__________________
Quote:
Eternal Life Roleplay - An upcoming unique RP server based in Palomino Creek
https://discord.gg/JWzE78r
Quote:
Originally Posted by !damo!spiderman View Post
You're pathetic. Stand for something that's going to help the world rather than fill it with more hate. Give someone a hug, tell someone you care... Do something, do anything but do it with love not hate.
StevenLV 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
error 035: argument type mismatch (argument 1)/(argument 2) DavidGravelli Scripting Help 3 08/03/2019 11:42 AM
Assistance Needed | error 035: argument type mismatch (argument 2) KevTheJoker Scripting Help 4 14/01/2019 09:29 PM
D:\server\gamemodes\ExtremeGame.pwn(22326) : error 035: argument type mismatch (argument 2) enzulikeS Scripting Help 2 25/04/2018 03:38 PM
C:\Users\Lirbo\Desktop\Roleplay\gamemodes\ERP.pwn( 19) : error 035: argument type mismatch (argument 1) Lirbo Scripting Help 2 12/12/2014 02:51 PM
error 35: Argument Type Mismatch (argument 2) Forbidden Name System Stoyanov Scripting Help 2 01/11/2014 08:50 PM


All times are GMT. The time now is 10:39 PM.


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