SA-MP Forums Archive
argmuent type mismatch - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: argmuent type mismatch (/showthread.php?tid=101044)



argmuent type mismatch - UsaBoy91 - 08.10.2009

pawn Код:
new Math_Result; // top of script - global variable

// On my command , Callback OnPlayerCommandText
if(!strcmp(Math_Operator[0],"+",true))
{
  Math_Result = Math_Number1 + Math_Number2;
}

//OnPlayerText

if(!strcmp(text, Math_Result, true)) // Line - 45.227
{
  SendClientMessage(playerid,COLOR_LIGHTRED,"You have won the event.");
  GivePlayerMoney(playerid,random(5000));
}
Код:
D:\AnGeL\SAMP\gamemodes\gf.pwn(45227) : error 035: argument type mismatch (argument 2)
I've tryed with strval , but no way

Can somebady help me ?


Re: argmuent type mismatch - ferriswheel - 08.10.2009

pawn Код:
if(strval(text) == Math_Result) // 45,227
{
  SendClientMessage(playerid,COLOR_LIGHTRED,"You have won the event.");
  GivePlayerMoney(playerid,random(5000));
}
Untested, I believe that should work.


Re: argmuent type mismatch - UsaBoy91 - 08.10.2009

lol , it worked . Thank you very much