Coding help
#1

Hey I am getting error 035: argument type mismatch (argument 2) Error with this code

Code:
CMD:announce(playerid, params[])
{

    if(PlayerInfo[playerid][pAdmin] >= 2)
         return SendClientMessage(playerid, "You are not allowed to use this command");

    new text[64], time, style;
    if (sscanf(params, "iis[64]", style, time, text)) return
        SendClientMessage( playerid,"Usage: /announce <style[0-6]> <time in ms> <text>");

    if (strlen(text) > 64) return
        SendClientMessage(playerid,"Message too long please shorten it ");

    if(style == 2) return SendClientMessage(playerid,"Bug with style 2 don't use it!");

    if (style < 0 || style > 6) return
        SendClientMessage(playerid,0x854900FF,"Invalid style");

    if (time > 20*1000) return
        SendClientMessage(playerid,"No longer than 20 seconds");

    GameTextForAll(text, time, style);

    return true;
}
Could I get some help plox?
Reply
#2

Which line is it specifically?

Edit: I'm pretty sure you forgot to add the color after playerid on SendClientMessage
Reply
#3

line ?
Reply
#4

Follwing errors on the lines

C:\Users\Josh\Desktop\Scripts\New Folder\gamemodes\OSRP.pwn(4650 : error 035: argument type mismatch (argument 2)
C:\Users\Josh\Desktop\Scripts\New Folder\gamemodes\OSRP.pwn(46512) : error 035: argument type mismatch (argument 2)
C:\Users\Josh\Desktop\Scripts\New Folder\gamemodes\OSRP.pwn(46514) : warning 213: tag mismatch
C:\Users\Josh\Desktop\Scripts\New Folder\gamemodes\OSRP.pwn(46515) : error 035: argument type mismatch (argument 2)
C:\Users\Josh\Desktop\Scripts\New Folder\gamemodes\OSRP.pwn(46517) : error 035: argument type mismatch (argument 2)
C:\Users\Josh\Desktop\Scripts\New Folder\gamemodes\OSRP.pwn(46523) : error 035: argument type mismatch (argument 2)
C:\Users\Josh\Desktop\Scripts\New Folder\gamemodes\OSRP.pwn(46525) : warning 213: tag mismatch
C:\Users\Josh\Desktop\Scripts\New Folder\gamemodes\OSRP.pwn(109975) : warning 203: symbol is never used: "mysql_connection"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Reply
#5

Remove mysql_connection and look at my first post.
Reply
#6

Quote:
Originally Posted by EAsT-OAK_510
View Post
Remove mysql_connection and look at my first post.
Got it fixxed it was the color thingy, thanks for the help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)