How do i put a long line to something smaller?.... -
FujiNNN - 27.10.2010
what i meant is like.. get 1 long line and make it more smaller and more conformable to use instead of this.. (with errors about
: line is to long)
pawn Код:
format(string, sizeof(string),"Cell Phone (Cost: $%d)\nItem Removed (Cost: $0)\nPhone Book (Cost: $%d)\nItem Removed (Cost: $0)\nItem Removed (Cost: $0)\nItem Removed (Cost: $0)\nWater Bottle (Cost: $%d)\nCondom (Cost: $%d)\nItem Removed (Cost: $0)\nFrozen Chicken (Cost: $%d)\nFrozen Hamburger (Cost: $%d)\nFrozen Pizza (Cost: $%d)\nGPS Software (Cost: $%d)\nPack of Cigarettes(X20)(X20) (Cost: $%d)\nItem Removed (Cost: $0)\nRope (Cost: $%d)\nCutter (Cost: $%d)\nJar of Cookies (Cost: $%d)\nItem Removed (Cost: $0)\nItem Removed (Cost: $0)",phonecost,phonebookcost,bottlecost,condomcost,mp3cost,chickencost,hamburgercost,pizzacost,gpscost,cigarettescost,ropecost,cuttercost,cookiescost,fuelcancost);
strmid(STOREMENUTEXT1,string,0,strlen(string),255);
Re: How do i put a long line to something smaller?.... -
Kyle - 27.10.2010
You cant, Unless you store it in an array at the top of the script.
Re: How do i put a long line to something smaller?.... -
FujiNNN - 27.10.2010
Quote:
Originally Posted by Firez
u can actually
pawn Код:
format(string, sizeof(string),"Cell Phone (Cost: $%d)\nItem Removed (Cost: $0)\nPhone Book (Cost: $%d)\nItem Removed (Cost: $0)\nItem Removed (Cost: $0)\nItem Removed (Cost: $0)\n,\ Water Bottle (Cost: $%d)\nCondom (Cost: $%d)\nItem Removed (Cost: $0)\nFrozen Chicken (Cost: $%d)\nFrozen Hamburger (Cost: $%d)\nFrozen Pizza (Cost: $%d)\nGPS Software (Cost: $%d)\nPack of Cigarettes(X20)(X20) (Cost: $%d)\nItem Removed (Cost: $0)\n,\ Rope (Cost: $%d)\nCutter (Cost: $%d)\nJar of Cookies (Cost: $%d)\nItem Removed (Cost: $0)\nItem Removed (Cost: $0)", phonecost,phonebookcost,bottlecost,condomcost,mp3cost,chickencost,hamburgercost,pizzacost,gpscost,cigarettescost,ropecost,cuttercost,cookiescost,fuelcancost); strmid(STOREMENUTEXT1,string,0,strlen(string),255);
|
still...
pawn Код:
D:\SERVER\gamemodes\gf.pwn(12002) : error 075: input line too long (after substitutions)
D:\SERVER\gamemodes\gf.pwn(12003) : error 037: invalid string (possibly non-terminated string)
D:\SERVER\gamemodes\gf.pwn(12003) : error 017: undefined symbol "Cell"
D:\SERVER\gamemodes\gf.pwn(12003) : error 017: undefined symbol "Phone"
D:\SERVER\gamemodes\gf.pwn(12003) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
someone?..
Re: How do i put a long line to something smaller?.... -
Crayon - 27.10.2010
Try Kyles idea.
Re: How do i put a long line to something smaller?.... -
FujiNNN - 28.10.2010
Quote:
Originally Posted by Crayon
Try Kyles idea.
|
i don't get the idea..
can you explane how do i create it?..
Re: How do i put a long line to something smaller?.... -
Zamaroht - 28.10.2010
A solution to this (although it is worse performance-wise) is to do something like:
pawn Код:
new string[512];
format(string, sizeof(sting), "blabla %d bla \n", number);
format(string, sizeof(sting), "%sthis is the second line: %d \n", string, another number);
format(string, sizeof(sting), "%smore text", string);
I think you get the point
Re: How do i put a long line to something smaller?.... -
FujiNNN - 28.10.2010
Quote:
Originally Posted by Zamaroht
A solution to this (although it is worse performance-wise) is to do something like:
pawn Код:
new string[512]; format(string, sizeof(sting), "blabla %d bla \n", number); format(string, sizeof(sting), "%sthis is the second line: %d \n", string, another number); format(string, sizeof(sting), "%smore text", string);
I think you get the point
|
yeah.. but what i'm trying to do if you noticed.. is i want several things in the DIALOG_MENU without creating a NEXT PAGE button..
if you can help me to create that it will be great, thank you for your help.
Re: How do i put a long line to something smaller?.... -
Zamaroht - 28.10.2010
Quote:
Originally Posted by FujiNNN
yeah.. but what i'm trying to do if you noticed.. is i want several things in the DIALOG_MENU without creating a NEXT PAGE button..
if you can help me to create that it will be great, thank you for your help.
|
That is what the code is doing, it is adding text to the same string array.
Re: How do i put a long line to something smaller?.... -
FujiNNN - 28.10.2010
Quote:
Originally Posted by Zamaroht
That is what the code is doing, it is adding text to the same string array.
|
ohh ok ill try thank you.