help plz.. (error 027: invalid character constant) - 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: help plz.. (error 027: invalid character constant) (
/showthread.php?tid=656726)
help plz.. (error 027: invalid character constant) -
GameOvr - 22.07.2018
guys I tried to make an input style dialog but it gives the following error
error:
Код:
tdm.pwn(271) : error 027: invalid character constant
tdm.pwn(271) : error 027: invalid character constant
tdm.pwn(271 -- 272) : error 029: invalid expression, assumed zero
tdm.pwn(271 -- 272) : fatal error 107: too many error messages on one line
Compilation aborted.
Pawn compiler 3.10.8 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
[Finished in 0.1s with exit code 1]
code:
Код:
if(inputtext[0] == '10')//m4 200
{
if(GetPlayerMoney(playerid) >= 200)
{
GivePlayerWeapon(playerid, 22, 100);
GivePlayerMoney(playerid, -100);
}
}
any help with this??
Re: help plz.. (error 027: invalid character constant) -
Florin48 - 22.07.2018
try
if(inputtext[0] == "10")
if it does not work use strcmp
Re: help plz.. (error 027: invalid character constant) -
GameOvr - 22.07.2018
Quote:
Originally Posted by Florin48
try
if(inputtext[0] == "10")
if it does not work use strcmp
|
wut i already used if(inputtext[0] == "10") haven't you read
and plz tell me how to use strcmp on input style dialogs
Re: help plz.. (error 027: invalid character constant) -
Verc - 22.07.2018
He said " not ' ,It's different.
It's all in the wiki
https://sampwiki.blast.hk/wiki/Strcmp
Re: help plz.. (error 027: invalid character constant) -
GameOvr - 22.07.2018
so tell me is this correct
Код:
if(strcmp("10"))
{
if(GetPlayerMoney(playerid) >= 200)
{
GivePlayerWeapon(playerid, 22, 100);
GivePlayerMoney(playerid, -200);
}
}
Re: help plz.. (error 027: invalid character constant) -
Florin48 - 22.07.2018
if(strcmp(inputtext[0], "10", true) == 0)
{
.... your code
}
Re: help plz.. (error 027: invalid character constant) -
GameOvr - 22.07.2018
Quote:
Originally Posted by Florin48
if(strcmp(inputtext[0], "10", true) == 0)
{
.... your code
}
|
thank you very much .. it compiled but is there another way other than strcmp
Re: help plz.. (error 027: invalid character constant) -
Florin48 - 22.07.2018
Try what I said in the above message and see if it works.
Re: help plz.. (error 027: invalid character constant) -
GameOvr - 22.07.2018
sorry for bump just wanna thanks
Thank you bro(Florin4

I made my awesome ammunation system cuz of you