Dialog (5 errors)
#3

Yeah you need to create that string in a variable using strcat() and all your if(listitem == ) statements should be a switch() that is a really bad design choice right now.

There is one more option and by far this is my favorite and most recommended tried tested and true anyone serious about scripting would do this. Use Slices strlib you can download it here https://github.com/oscar-broman/strl...ter/strlib.inc there is a wonderful function called strimplode() Let me show you an example.

pawn Код:
#include <a_samp>
#include <strlib>

main() {

    new MyDialogString[1024];
   
    strimplode("",
        MyDialogString,
        sizeof(MyDialogString),
        "Drift1\nDrift2\nDrift3\nDrift4\nDrift5\nDrift6\nDrift7\nDrift8\nDrift9\nDrift10\n",
        "Drift11\nDrift12\nDrift13\nDrift14\nDrift15\nDrift16\nDrift17\nDrift18\nDrift19\n",
        "Drift20\nDrift21\nDrift22\nDrift23\nDrift24\nDrift25\nDrift26\nDrift27\nDrift28\n",
        "Drift29\nDrift30\nDrift31\nDrift32\nDrift33\nDrift34\nDrift35\nDrift36\nDrift37\n",
        "Drift38\nDrift39\nDrift40\nDrift41\nDrift42\nDrift43\nDrift44\nDrift45\nDrift46\n",
        "Drift47\nDrift48\nDrift49\nDrift50\nDrift51"
    );

    print(MyDialogString);
}
Try running this code here.

http://slice-vps.nl:7070/
Reply


Messages In This Thread
Dialog (5 errors) - by antoniotono97 - 31.10.2013, 21:49
Re: Dialog (5 errors) - by antoniotono97 - 31.10.2013, 22:40
Re: Dialog (5 errors) - by Pottus - 31.10.2013, 22:58
Re: Dialog (5 errors) - by antoniotono97 - 31.10.2013, 23:18
Re: Dialog (5 errors) - by antoniotono97 - 01.11.2013, 09:02
Re: Dialog (5 errors) - by antoniotono97 - 01.11.2013, 14:11
Re: Dialog (5 errors) - by BlackHorse - 01.11.2013, 15:40
Re: Dialog (5 errors) - by Konstantinos - 01.11.2013, 15:42

Forum Jump:


Users browsing this thread: 3 Guest(s)