Raised This Month: $51 Target: $400
 12% 

Solved 26 errors


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
eyal282
Veteran Member
Join Date: Aug 2011
Old 04-28-2018 , 09:54   26 errors
Reply With Quote #1

What things should I focus on locating when I get the well known 26 errors at once?

The code is 3000 lines long and it's private so I cannot provide it.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334

Last edited by eyal282; 04-28-2018 at 14:34.
eyal282 is offline
PinHeaDi
Senior Member
Join Date: Jul 2013
Location: Bulgaria
Old 04-28-2018 , 10:01   Re: 26 errors
Reply With Quote #2

So we don't have even the errors? You're not serious, right? 26 errors are ~ 26 lines, so you won't spoil us the code.
__________________

Last edited by PinHeaDi; 04-28-2018 at 10:02.
PinHeaDi is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 04-28-2018 , 10:16   Re: 26 errors
Reply With Quote #3

Quote:
Originally Posted by PinHeaDi View Post
So we don't have even the errors? You're not serious, right? 26 errors are ~ 26 lines, so you won't spoil us the code.
I suspect it's something like putting { without a twin } and it screws the entire code and the similar, I am a pretty decent scripter when I say these are the type of errors.

C:\Users\ron\Desktop\DesktopReal\Compiler\BL-lr.sp(1043) : warning 219: local variable "victim" shadows a variable at a preceding level

This appears in this public:

public Action:Event_Hurt(victim, &attacker, &inflictor, Float:&damage, &damagetype)

There aren't any global variables named "victim", so it might help directing.

Also:

if(!LRStarted)
return Plugin_Continue;

==

C:\Users\ron\Desktop\DesktopReal\Compiler\BL-lr.sp(1045) : error 010: invalid function or declaration
C:\Users\ron\Desktop\DesktopReal\Compiler\BL-lr.sp(1046) : error 010: invalid function or declaration
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334

Last edited by eyal282; 04-28-2018 at 10:20.
eyal282 is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 04-28-2018 , 10:23   Re: 26 errors
Reply With Quote #4

Read the errors in order, understand what the error messages mean (don't bother with warnings at this point), and check what lines are making the compiler give up (the lines are listed in parentheses at the end of each error, so you're looking around line 1043 in your plugin). If nothing stands out, run it through a linter and see if any formatting issues are made obvious.

That's all I can suggest; you're on your own here.

Depending on how your plugin is structured, you might be able to segment your code into individual .sp files and include them into your main plugin (see how some of the preinstalled plugins do it), which would possibly help with organization.
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)

Last edited by nosoop; 04-28-2018 at 10:29.
nosoop is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 04-28-2018 , 10:39   Re: 26 errors
Reply With Quote #5

Quote:
Originally Posted by nosoop View Post
Read the errors in order, understand what the error messages mean (don't bother with warnings at this point), and check what lines are making the compiler give up (the lines are listed in parentheses at the end of each error, so you're looking around line 1043 in your plugin). If nothing stands out, run it through a linter and see if any formatting issues are made obvious.

That's all I can suggest; you're on your own here.

Depending on how your plugin is structured, you might be able to segment your code into individual .sp files and include them into your main plugin (see how some of the preinstalled plugins do it), which would possibly help with organization.

The first error is this:

C:\Users\ron\Desktop\DesktopReal\Compiler\BL-lr.sp(1043) : error 001: expected token: "-identifier-", but found "&"

Line 1043:

public Action:Event_Hurt(victim, &attacker, &inflictor, Float:&damage, &damagetype)

Am I failing to notice something? Looks good to me. That's an SDKHook of TakeDamage BTW.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
backwards
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 04-28-2018 , 11:07   Re: 26 errors
Reply With Quote #6

Quote:
Float:&damage
maybe this part?
__________________
I highly recommend joining the SourceMod Discord Server for real time support.
backwards is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 04-28-2018 , 11:19   Re: 26 errors
Reply With Quote #7

Quote:
Originally Posted by 1337norway View Post
maybe this part?
Thanks. How did it work in all other plugins of mine 0.0
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334

Last edited by eyal282; 04-28-2018 at 11:21.
eyal282 is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 04-28-2018 , 11:23   Re: 26 errors
Reply With Quote #8

PHP Code:
public Action:Event_Hurt(victim, &attacker, &inflictor, &Float:damage, &damagetype// Old Style
public Action Event_Hurt(int victimint &attackerint &inflictorfloat &damageint &damagetype// New style 
Notice the & changing position. Something that simple can cause many false-positive errors, same as mentioned above a missing { }
__________________
Silvers is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 04-28-2018 , 12:08   Re: 26 errors
Reply With Quote #9

The compiler just shows a shitload of errors like local variable "x" shadows a variable at a preceding level even when there isn't such an error but it's somewhere else, and you just have to go through the whole code to figure out where it is.
__________________
retired
shavit is offline
pride95
Senior Member
Join Date: Aug 2015
Old 04-28-2018 , 12:15   Re: 26 errors
Reply With Quote #10

if your code is private, we cannot help you
read the forum rules before you make a thread.
pride95 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:06.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode