SA-MP Forums Archive
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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: error 027: invalid character constant (/showthread.php?tid=213768)



error 027: invalid character constant - Face9000 - 19.01.2011

pawn Код:
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Weapons", "\nBrass Knucles \nGolf Club \nNite Stick \nKnife \nBaseball Bat \nShovel \nPoolCue \nKatana \nChainsaw \nDildo \nSM Vib \nL Vib\nSI Vib \nFlowers \nCane \nGrenades \nTearGas \nMolovs \n9mm \nS9MM \nDesertEagle \nShotgun \nSawnoff \nSpas12 \nUZI \nmp5 \nak47 \nm4 \ntec9 \nRifle \SRifle \nRPG \nHeatSeaker \nFlameTh \nMinigun \nSatchel \nDet \nSpray \nFireExt\nCamera \nNightV \nThVis \nPara", "Ok!", "Cancel");
WTF?


Re: error 027: invalid character constant - -Rebel Son- - 19.01.2011

I believe its to long bro.


Re: error 027: invalid character constant - Face9000 - 19.01.2011

Damn :/

But if it was too long,Pawno will return me "input line too long" or similar :/


Re: error 027: invalid character constant - admantis - 19.01.2011

Make them in separate dialogs with a button saying 'Next' and you add other dialog etc because your code is perfect besides that.


Re: error 027: invalid character constant - iggy1 - 19.01.2011

Its because "Weapons" isnt a dialog style you need to add dialog id then style. eg
pawn Код:
ShowPlayerDialog(playerid, DEPOSIT_DIALOG, DIALOG_STYLE_INPUT,
The compiler is expecting a constant as the third param not a string.

EDIT: My bad missed the number 2


Re: error 027: invalid character constant - admantis - 19.01.2011

Quote:
Originally Posted by iggy1
Посмотреть сообщение
Its because "Weapons" isnt a dialog style you need to add dialog id then style. eg
pawn Код:
howPlayerDialog(playerid, DEPOSIT_DIALOG, DIALOG_STYLE_INPUT,
The compiler is expecting a constant as the third param not a string.
It's good or im blind. Look.
pawn Код:
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST,
// playerid = player paramerter
// 2 = dialogid
// DIALOG_STYLE_LIST = list dialog style
First playerid then id then style THEN the message string.


Re: error 027: invalid character constant - iggy1 - 19.01.2011

Its not because the lines too long its this code in the list "\SRifle" / s isnt a charachter constant.


Re: error 027: invalid character constant - [L3th4l] - 19.01.2011

pawn Код:
\nRifle \SRifle
To
pawn Код:
\nRifle \nRifle



Re: error 027: invalid character constant - admantis - 19.01.2011

Ah right, didn't notise that.


Re: error 027: invalid character constant - Face9000 - 20.01.2011

I have 2 different rifle.

1st is SRifle = Sniper Rifle
2nd is Country Rifle

..

EDIT: NVM,fixed.

Thanks all!