SA-MP Forums Archive
Pass string in a function? - 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: Pass string in a function? (/showthread.php?tid=619395)



Pass string in a function? - Amads - 17.10.2016

My brain doesn't want to cooperate.

PHP Code:
// somewhere
new str[64];
strcat(str"something something");
ShowDialog(playerid1str); // 133 
PHP Code:
// function
ShowDialog(playeridIDstr)
{
    switch(
ID)
    {
        case 
1ShowPlayerDialog(playeridIDDIALOG_STYLE_PASSWORD"Register"str"Register""Kick me!"); // 175
        // and more
    
}
    return 
1;

PHP Code:
C:\Users\me\Desktop\SAMP\test\dm.pwn(133) : error 035argument type mismatch (argument 3)
C:\Users\me\Desktop\SAMP\test\dm.pwn(175) : error 035argument type mismatch (argument 5



Re: Pass string in a function? - Konstantinos - 17.10.2016

Code:
ShowDialog(playerid, ID, str[])



Re: Pass string in a function? - Amads - 17.10.2016

Oops. Thanks!