Help me
#1

C:\Users\Administrator\Desktop\Los-Santos Roleplay\gamemodes\trucker.pwn(791) : error 075: input line too long (after substitutions)
C:\Users\Administrator\Desktop\Los-Santos Roleplay\gamemodes\trucker.pwn(792) : error 017: undefined symbol "deli"
C:\Users\Administrator\Desktop\Los-Santos Roleplay\gamemodes\trucker.pwn(793) : warning 217: loose indentation
C:\Users\Administrator\Desktop\Los-Santos Roleplay\gamemodes\trucker.pwn(793) : error 017: undefined symbol "verWanted"
C:\Users\Administrator\Desktop\Los-Santos Roleplay\gamemodes\trucker.pwn(793) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\Los-Santos Roleplay\gamemodes\trucker.pwn(793) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\Los-Santos Roleplay\gamemodes\trucker.pwn(793) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Errors.



- line error code

format(title, sizeof(title), "%s", Job_Trucker[returnid][deliverName]);
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]);
strcat(helpstr1, gString1);
}
Reply
#2

Who knows how to fix me, please?
Reply
#3

the line is too long trying to make 2 messages or something else
Reply
#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
#5

I did it your way, and an error occurred.


Quote:

C:\Users\Administrator\Desktop\Los-Santos Roleplay\gamemodes\trucker.pwn(846) : error 017: undefined symbol "Vehicle@YSII_Ag"
C:\Users\Administrator\Desktop\Los-Santos Roleplay\gamemodes\trucker.pwn(846) : error 017: undefined symbol "Vehicle@YSII_Ag"
C:\Users\Administrator\Desktop\Los-Santos Roleplay\gamemodes\trucker.pwn(846) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\Los-Santos Roleplay\gamemodes\trucker.pwn(846) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

This is a faulty 846 line , Do you know how to fix this without fixing me? , thank you.

Quote:

stock PlayerToCar(playerid,type,Float:distance) {
new Float, Float:y, Float:z, Float:closedist, id = -1;
foreach(new c : Vehicle)
{

Reply
#6

The error is in another line, not related to previous.

It basically tells you that iterator "Vehicle" is unknown.
• The iterator is included in YSI 4 so if you use YSI then update to latest version.
• Create your own iterator if you do not use YSI. This means, you will need to hook the functions that create a vehicle and add vehicleid to iterator. Then hook OnVehicleDestroy and remove item from iterator.
Reply
#7

Image : http://www.upsieutoc.com/image/4roVIQ


So I fixed it successfully?
Reply
#8

Yes, you did.

About the "Vehicle" iterator, you can download YSI 4 and include y_iterate which is the non-standalone version of foreach:
pawn Код:
#include <YSI\y_iterate>
Detailed here:
Quote:
Originally Posted by Calisthenics
Посмотреть сообщение
[..]
To test YSI, I downloaded latest version: https://github.com/pawn-lang/YSI-Inc...rchive/4.x.zip
also amx_assembly: https://github.com/Zeex/amx_assembly/archive/master.zip
Extracted both.
Inside of folder "YSI-Includes-4.x", I created a new folder called "amx" and I placed all files from "amx_assembly-master" to "YSI-Includes-4.x\amx" folder.
Last, I moved all files and folders from "YSI-Includes-4.x" to pawno\include folder and that's it.

Now about including YSI libraries (say y_iterate), I use:
pawn Код:
#include <a_samp>
// YSI libraries after a_samp
#include <YSI\y_iterate>
// any other include
Using slash will fail, this will not work:
pawn Код:
#include <YSI/y_iterate>
Reply
#9

Yeah , thanks bro .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)