Raised This Month: $ Target: $400
 0% 

7 errors one line


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bLu3eYeZ
Junior Member
Join Date: Sep 2011
Old 09-20-2011 , 13:23   7 errors one line
Reply With Quote #1

Well, I tryed to edit a plugin for the mod Hide and Seek, but I failed badly. Got 7 errors on one line and I cant figure out how on earth I did that. I would badly apreciate if you help me
Attached Files
File Type: sma Get Plugin or Get Source (blucraftbm.sma - 549 views - 168.4 KB)
bLu3eYeZ is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-20-2011 , 16:54   Re: 7 errors one line
Reply With Quote #2

The errors tell you what is wrong.

Code:
compile.sma(1305) : error 088: number of arguments does not match definition
compile.sma(1306) : error 088: number of arguments does not match definition
compile.sma(1307) : error 088: number of arguments does not match definition
compile.sma(1669) : error 017: undefined symbol "gfFlashGrenadeNextUse"
compile.sma(1669) : warning 215: expression has no effect
compile.sma(1669) : error 001: expected token: ";", but found "]"
compile.sma(1669) : error 029: invalid expression, assumed zero
compile.sma(1669) : fatal error 107: too many error messages on one line
1305: There is only one function on that line and the number of arguments does not match definition (aka look at the definition of the function)

1306: See 1305.
1307: See 1306.
1669: undefined symbol "gfFlashGrenadeNextUse"

You should try to fix them one by one as the others on line 1669 are likely caused by the first (on that line).
__________________

Last edited by fysiks; 09-20-2011 at 16:57.
fysiks is offline
bLu3eYeZ
Junior Member
Join Date: Sep 2011
Old 09-21-2011 , 03:19   Re: 7 errors one line
Reply With Quote #3

Code:
case BM_FLASH: actionFlash(id);
case BM_FROST: actionFrost(id);
case BM_HE: actionHe(id);
These are the lines 1305-1307, but I do not understand whats wrong.
EDIT: I understand, but I do not know how to fix it.

Last edited by bLu3eYeZ; 09-21-2011 at 03:34.
bLu3eYeZ is offline
e12harry
Member
Join Date: Apr 2010
Old 09-21-2011 , 03:31   Re: 7 errors one line
Reply With Quote #4

you don't have enough parameters. Each function takes 2 params:
PHP Code:
actionFlash(idOverrideTimer)

....
actionFrost(idOverrideTimer)
{
...
actionHe(idOverrideTimer)
{
... 
and you specify only one
PHP Code:
case BM_FLASHactionFlash(id);
case 
BM_FROSTactionFrost(id);
case 
BM_HEactionHe(id); 
gfFlashGrenadeNextUse ? propably it is gfFlashNextUse but still it is not declared anywhere
add:
PHP Code:
new Float:gfFlashNextUse[33];
new 
Float:gfFrostNextUse[33];
new 
Float:gfHENextUse[33]; 
You should have 3 warnirngs after this:

Warning: Symbol is assigned a value that is never used: "fHeCooldown" on line 3912
Warning: Symbol is assigned a value that is never used: "fFlashCooldown" on line 3912
Warning: Symbol is assigned a value that is never used: "fFrostCooldown" on line 3912
e12harry is offline
bLu3eYeZ
Junior Member
Join Date: Sep 2011
Old 09-21-2011 , 04:05   Re: 7 errors one line
Reply With Quote #5

The actions still do not match definition.
Code:
                        case BM_FLASH: actionFlash(id);
                        case BM_FROST: actionFrost(id);
                        case BM_HE: actionHe(id);
If i add:
Code:
                        case BM_FLASH: actionFlash(id, Overridetimer);
                        case BM_FROST: actionFrost(id, Overridetimer);
                        case BM_HE: actionHe(id, Overridetimer);
it says the symbol is unidentifyed.
bLu3eYeZ is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 09-21-2011 , 04:09   Re: 7 errors one line
Reply With Quote #6

You don't understand anything it seems.

I suggest you read the pawn tutorial if you want to learn how to script, if you don't want to learn, just post in suggestions/requests from now on.

Now, on those stocks, you need to input a value... ofc it says it's undefined because it is undefined... just put 0 and be done with it, but you should read the stock and see what that argument does.
__________________
Hunter-Digital is offline
bLu3eYeZ
Junior Member
Join Date: Sep 2011
Old 09-21-2011 , 04:25   Re: 7 errors one line
Reply With Quote #7

Thankyou. I had to put (id, 0) I just couldn't understand it. Thankyou very much!
bLu3eYeZ is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-21-2011 , 18:08   Re: 7 errors one line
Reply With Quote #8

There are 6 examples right above that code to show you how that type of function us used in that situation. You will need to learn to look at how other parts of the code work to make your coding experience easier for you and a less cumbersome for us.
__________________
fysiks 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 19:32.


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