Help me
#4

Line limit is 511 characters.

One trick to by-pass the error is splitting the arguments to next line:
pawn Код:
format(gString1, sizeof(gString1),
    "Khu cong nghiep:%s{FFFFFF}!\n\n{FFFF00}Items\n{C3C3C3}Ten\t \tGia(Ca nhan)\t\tHang tonkho\n{FFFFFF}%s\t\t$%d\t\t%d\n \n{FFFF00}Mua vatpham\n{C3C3C3}Ten\t\tGia(Ca nhan)\t\tSo luongcau\n{FFFFFF}%s\t\t$%d\t\t%d\n",
    isrun1, ReturnCargoName(Job_Trucker[returnid][deliverType]), Job_Trucker[returnid][deliverPrice], Job_Trucker[returnid][deliverStock], ReturnCargoName(Job_Trucker[returnid][deliverWanted][0]), Job_Trucker[returnid][deliverWanted][1], Job_Trucker[returnid][deliverWanted][2]);
I use the method above explicitly for readability. Another great solution (which happen to use too) is Zeex compiler which increases the limit: https://github.com/pawn-lang/compiler/releases

There are more ways but strcat and re-format are not appropriate when you can combine the 2 methods above.
Reply


Messages In This Thread
Help me - by linhpro200294 - 01.07.2018, 14:21
Re: Help me - by linhpro200294 - 01.07.2018, 14:23
Re: Help me - by Florin48 - 01.07.2018, 15:42
Re: Help me - by Calisthenics - 01.07.2018, 16:09
Re: Help me - by linhpro200294 - 01.07.2018, 16:23
Re: Help me - by Calisthenics - 01.07.2018, 16:28
Re: Help me - by linhpro200294 - 01.07.2018, 16:36
Re: Help me - by Calisthenics - 01.07.2018, 16:41
Re: Help me - by linhpro200294 - 01.07.2018, 17:52

Forum Jump:


Users browsing this thread: 1 Guest(s)