Coding help - 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: Coding help (
/showthread.php?tid=406539)
Coding help -
Nick_Phelps - 10.01.2013
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?
Re: Coding help -
EAsT-OAK_510 - 10.01.2013
Which line is it specifically?
Edit: I'm pretty sure you forgot to add the color after playerid on SendClientMessage
Re : Coding help -
yusei - 10.01.2013
line ?
Re: Coding help -
Nick_Phelps - 10.01.2013
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.
Re: Coding help -
EAsT-OAK_510 - 10.01.2013
Remove mysql_connection and look at my first post.
Re: Coding help -
Nick_Phelps - 10.01.2013
Quote:
Originally Posted by EAsT-OAK_510
Remove mysql_connection and look at my first post.
|
Got it fixxed it was the color thingy, thanks for the help