COMMAND NOT WORKING...
#1

i've got this code and it's only showing me the bottom line only..
how can i see all the lines setted?.. thank you..

pawn Код:
new STOREMENUTEXT1[1024];
    format(string, sizeof(string),"Cell Phone (Cost: $%d)\nItem Removed (Cost: $0)\nPhone Book (Cost: $%d)\n",phonecost,phonebookcost);
    format(string, sizeof(string),"Item Removed (Cost: $0)\nItem Removed (Cost: $0)\nItem Removed (Cost: $0)\n",bottlecost,condomcost);
    format(string, sizeof(string),"Water Bottle (Cost: $%d)\nCondom (Cost: $%d)\nItem Removed (Cost: $0)\n",string);
    format(string, sizeof(string),"Frozen Chicken (Cost: $%d)\nFrozen Hamburger (Cost: $%d)\nFrozen Pizza (Cost: $%d)\nGPS Software (Cost: $%d)\n",string);
    format(string, sizeof(string),"Pack of Cigarettes(X20)(X20) (Cost: $%d)\nItem Removed (Cost: $0)\nRope (Cost: $%d)\nCutter (Cost: $%d)\n",chickencost,hamburgercost,pizzacost,gpscost,cigarettescost,ropecost,cuttercost);
    format(string, sizeof(string),"Jar of Cookies (Cost: $%d)\nItem Removed (Cost: $0)\nItem Removed (Cost: $0)",cookiescost);
    strmid(STOREMENUTEXT1,string,0,strlen(string),255);
Reply
#2

can you fix my code and give me the right way to do it cuz im new with strcat and all of that..

thank you,,
Reply
#3

somebody?... please..
Reply
#4

pawn Код:
new STOREMENUTEXT1[1024];
    strcat(STOREMENUTEXT1,"Cell Phone (Cost: $%d)\nItem Removed (Cost: $0)\nPhone Book (Cost: $%d)\n",phonecost,phonebookcost);
    strcat(STOREMENUTEXT1,"Item Removed (Cost: $0)\nItem Removed (Cost: $0)\nItem Removed (Cost: $0)\n",bottlecost,condomcost);
    strcat(STOREMENUTEXT1,"Water Bottle (Cost: $%d)\nCondom (Cost: $%d)\nItem Removed (Cost: $0)\n",string);
    strcat(STOREMENUTEXT1,"Frozen Chicken (Cost: $%d)\nFrozen Hamburger (Cost: $%d)\nFrozen Pizza (Cost: $%d)\nGPS Software (Cost: $%d)\n",string);
    strcat(STOREMENUTEXT1,"Pack of Cigarettes(X20)(X20) (Cost: $%d)\nItem Removed (Cost: $0)\nRope (Cost: $%d)\nCutter (Cost: $%d)\n",chickencost,hamburgercost,pizzacost,gpscost,cigarettescost,ropecost,cuttercost);
    strcat(STOREMENUTEXT1,"Jar of Cookies (Cost: $%d)\nItem Removed (Cost: $0)\nItem Removed (Cost: $0)",cookiescost);
    strmid(STOREMENUTEXT1,string,0,strlen(string),255);
like this but is not correct u have 2 format and then use stract but use like this
Reply
#5

Quote:
Originally Posted by gigi1223
Посмотреть сообщение
pawn Код:
new STOREMENUTEXT1[1024];
    strcat(STOREMENUTEXT1,"Cell Phone (Cost: $%d)\nItem Removed (Cost: $0)\nPhone Book (Cost: $%d)\n",phonecost,phonebookcost);
    strcat(STOREMENUTEXT1,"Item Removed (Cost: $0)\nItem Removed (Cost: $0)\nItem Removed (Cost: $0)\n",bottlecost,condomcost);
    strcat(STOREMENUTEXT1,"Water Bottle (Cost: $%d)\nCondom (Cost: $%d)\nItem Removed (Cost: $0)\n",string);
    strcat(STOREMENUTEXT1,"Frozen Chicken (Cost: $%d)\nFrozen Hamburger (Cost: $%d)\nFrozen Pizza (Cost: $%d)\nGPS Software (Cost: $%d)\n",string);
    strcat(STOREMENUTEXT1,"Pack of Cigarettes(X20)(X20) (Cost: $%d)\nItem Removed (Cost: $0)\nRope (Cost: $%d)\nCutter (Cost: $%d)\n",chickencost,hamburgercost,pizzacost,gpscost,cigarettescost,ropecost,cuttercost);
    strcat(STOREMENUTEXT1,"Jar of Cookies (Cost: $%d)\nItem Removed (Cost: $0)\nItem Removed (Cost: $0)",cookiescost);
    strmid(STOREMENUTEXT1,string,0,strlen(string),255);
like this but is not correct u have 2 format and then use stract but use like this

dude.... so much errorss!!!

can someone please help me..?.....
thank you...
Reply
#6

dude read what i sayщ



===== like this but is not correct u have 2 format and then use stract but use like this
Reply
#7

ehh... i dont know..

i've tryed this too..

pawn Код:
new stext1[256],stext2[256],stext3[256],stext4[256],stext5[256],stext6[256];
    strcat(stext1,"Cell Phone (Cost: $%d)\nItem Removed (Cost: $0)\nPhone Book (Cost: $%d)\n",phonecost,phonebookcost);
    strcat(stext2,"Item Removed (Cost: $0)\nItem Removed (Cost: $0)\nItem Removed (Cost: $0)\n");
    strcat(stext3,"Water Bottle (Cost: $%d)\nCondom (Cost: $%d)\nItem Removed (Cost: $0)\n",bottlecost,condomcost);
    strcat(stext4,"Frozen Chicken (Cost: $%d)\nFrozen Hamburger (Cost: $%d)\nFrozen Pizza (Cost: $%d)\nGPS Software (Cost: $%d)\n",chickencost,hamburgercost,pizzacost,gpscost);
    strcat(stext5,"Pack of Cigarettes(X20)(X20) (Cost: $%d)\nItem Removed (Cost: $0)\nRope (Cost: $%d)\nCutter (Cost: $%d)\n",cigarettescost,ropecost,cuttercost);
    strcat(stext6,"Jar of Cookies (Cost: $%d)\nItem Removed (Cost: $0)\nItem Removed (Cost: $0)",cookiescost);
    strmid(stext1,stext2,stext3,stext4,stext5,stext6,string,0,strlen(string),255);
Reply
#8

please please someone.. i'm stuck with this..!
Reply
#9

Do it all in the same array:
pawn Код:
new text[length]; // length == long text 1 length + long text 2 length + long text 3 length...
strcal(text, "long text 1", sizeo(text));
strcal(text, "long text 2", sizeo(text));
strcal(text, "long text 3", sizeo(text));
strcal(text, "long text 4", sizeo(text));
strcal(text, "long text 5", sizeo(text));
strcal(text, "long text 6", sizeo(text));
strcal(text, "long text 7", sizeo(text));
strcal(text, "long text 8", sizeo(text));
strcal(text, "long text 9", sizeo(text));
Reply
#10

Quote:
Originally Posted by Miguel
Посмотреть сообщение
Do it all in the same array:
pawn Код:
new text[length]; // length == long text 1 length + long text 2 length + long text 3 length...
strcal(text, "long text 1", sizeo(text));
strcal(text, "long text 2", sizeo(text));
strcal(text, "long text 3", sizeo(text));
strcal(text, "long text 4", sizeo(text));
strcal(text, "long text 5", sizeo(text));
strcal(text, "long text 6", sizeo(text));
strcal(text, "long text 7", sizeo(text));
strcal(text, "long text 8", sizeo(text));
strcal(text, "long text 9", sizeo(text));
and where do i put all the strings?... (bottlecost,condomcost etc...?....

thank you.....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)