argmuent type mismatch
#1

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 ?
Reply
#2

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.
Reply
#3

lol , it worked . Thank you very much
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)