SA-MP Forums Archive
error 035: argument type mismatch (argument 2) - 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: error 035: argument type mismatch (argument 2) (/showthread.php?tid=587694)



error 035: argument type mismatch (argument 2) - BornHuman - 01.09.2015

pawn Код:
command(createrace, playerid, params)
{
    #pragma unused params
    new string[42];
    if(GetGVarInt("race_active", rRA) >= 1) return SendClientMessage(playerid, 0xFFFFFFFF, "*   Please wait, a race is already active.");
   
    format(string, sizeof(string), "Race Type                                                       {66AACC}%d\nSet Race Checkpoints                        {66AACC}%f\nVehicle Model                                                            {66AACC}%d\nCustom Radio Station                                                 {66AACC}%s\nConfirm Race\nReset", GetGVarInt("race_type", rType), GetGVarFloat("race_cp", Float:rCP), GetGVarInt("race_veh", rVehicle), GetGVarString("race_radio", rCRU));
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Race Setup", string, "Cancel", "");
    return 1;
}
halp


Re: error 035: argument type mismatch (argument 2) - Luke_James - 01.09.2015

Which line is giving the error?


Re: error 035: argument type mismatch (argument 2) - BornHuman - 01.09.2015

Quote:
Originally Posted by Luke_James
Посмотреть сообщение
Which line is giving the error?
pawn Код:
format(string, sizeof(string), "Race Type                                                       {66AACC}%d\nSet Race Checkpoints                        {66AACC}%f\nVehicle Model                                                            {66AACC}%d\nCustom Radio Station                                                 {66AACC}%s\nConfirm Race\nReset", GetGVarInt("race_type", rType), GetGVarFloat("race_cp", Float:rCP), GetGVarInt("race_veh", rVehicle), GetGVarString("race_radio", rCRU));
Thanks for the quick response


Re: error 035: argument type mismatch (argument 2) - ChromeAmazing - 01.09.2015

PHP код:
format(stringsizeof(string), "here\nhere\nhere");
ShowPlayerDialog(playerid1DIALOG_STYLE_LIST"Race Setup"string"Cancel"""); 



Re: error 035: argument type mismatch (argument 2) - BornHuman - 01.09.2015

Quote:
Originally Posted by ChromeAmazing
Посмотреть сообщение
PHP код:
format(stringsizeof(string), "here\nhere\nhere");
ShowPlayerDialog(playerid1DIALOG_STYLE_LIST"Race Setup"string"Cancel"""); 
dont see how that's different


Re: error 035: argument type mismatch (argument 2) - BornHuman - 02.09.2015

Could really use an answer on this it's a simple error


Re: error 035: argument type mismatch (argument 2) - Roberto80 - 02.09.2015

Lol? What Race Type? Show it please cuz its wrong


Re: error 035: argument type mismatch (argument 2) - BornHuman - 02.09.2015

Quote:
Originally Posted by Roberto80
Посмотреть сообщение
Lol? What Race Type? Show it please cuz its wrong
What are you talking about? Scroll over in the code to see the rest

REP+ for days to anyone who fixes this


Re: error 035: argument type mismatch (argument 2) - Abagail - 02.09.2015

Show the declarations for rType, rCP, etc.


Re: error 035: argument type mismatch (argument 2) - jlalt - 02.09.2015

try:
PHP код:
command(createraceplayeridparams)
{
    
#pragma unused params
    
new string[300];
    if(
GetGVarInt("race_active"rRA) >= 1) return SendClientMessage(playerid0xFFFFFFFF"*   Please wait, a race is already active.");
    
    
format(stringsizeof(string), "{66AACC}%d\nSet Race Checkpoints{66AACC}%f\nVehicle Model{66AACC}%d\nCustom Radio Station{66AACC}%s\nConfirm Race\nReset"GetGVarInt("race_type"rType), GetGVarFloat("race_cp"Float:rCP), GetGVarInt("race_veh"rVehicle), GetGVarString("race_radio"rCRU));
    
ShowPlayerDialog(playerid1DIALOG_STYLE_LIST"Race Type"string"Race Setup""Cancel");
    return 
1;