pawn-lang / compiler

Pawn compiler for SA-MP with bug fixes and new features - runs on Windows, Linux, macOS
Other
306 stars 72 forks source link

Not closed parentheses #110

Closed continue98 closed 6 years ago

continue98 commented 8 years ago

Hi. Try to add feature to capture not closed the brackets for day 3 looking for can't find. Perl scripts do not help. And, Yes, if you're Russian - it is better to switch to Russian language. Since the text is fully translated by Yandex :D

oscar-broman commented 8 years ago

It can't be that hard.. Start commenting out code until it compiles again, then start uncommenting code slowly.

continue98 commented 8 years ago

Yeah. Tell me in what place does the brace not closed? https://pp.vk.me/c630422/v630422027/34886/yBG2Tl3Ig64.jpg https://pp.vk.me/c630422/v630422352/3b9c7/6ObXuH2a0hE.jpg

Y-Less commented 8 years ago

I'd copy the line to post here, but for some obscure reason you posted code as an image instead of just text!

continue98 commented 8 years ago

`forward callback_load_warehouse_mafia(); public callback_load_warehouse_mafia(); { new rows, fields, time_load = GetTickCount();

error compiler crash

if (!rows)
    return print("[Загрузка складов мафии]: База данных с складами мафии - не найдена!");
materials_yakuza = cache_get_field_content_int(0, "materials_mafia");
materials_russian_mafia = cache_get_field_content_int(1, "materials_mafia");
materials_lcn = cache_get_field_content_int(2, "materials_mafia");
money_bank_lcn = cache_get_field_content_int(0, "money_mafia");
money_bank_yakuza = cache_get_field_content_int(1, "money_mafia");
money_bank_rm = cache_get_field_content_int(2, "money_mafia");
printf("[Загрузка складов мафии]: Загрузка складов мафии - прошла успешна! Склады загружены за %d мс", GetTickCount() - time_load);
return 1;

}`

continue98 commented 8 years ago

ahaha. As for github to send code?

Y-Less commented 8 years ago

Ok, I saw several replies, then they all vanished, but here is the problem:

public callback_load_warehouse_mafia();
continue98 commented 8 years ago

Y-Less, lol. Code written in the 2 - 3am, and then didn't pay attention to ";". hmm

continue98 commented 8 years ago

If that's so, then it gives an error, but if you put it on the line below #error, then the compiler crashes https://gist.github.com/KennyDalglish/a58b5d756dde02e11a9540d7927aad7e

oscar-broman commented 8 years ago

So don't put #error there.

continue98 commented 8 years ago

what?

YashasSamaga commented 7 years ago

@KennyDalglish #error is not crashing the compiler for similar code.

main()
{
new
        rows,
        fields,
    #error crash_compiler