AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   7 errors one line (https://forums.alliedmods.net/showthread.php?t=167813)

bLu3eYeZ 09-20-2011 13:23

7 errors one line
 
1 Attachment(s)
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 :3

fysiks 09-20-2011 16:54

Re: 7 errors one line
 
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).

bLu3eYeZ 09-21-2011 03:19

Re: 7 errors one line
 
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.

e12harry 09-21-2011 03:31

Re: 7 errors one line
 
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

bLu3eYeZ 09-21-2011 04:05

Re: 7 errors one line
 
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.

Hunter-Digital 09-21-2011 04:09

Re: 7 errors one line
 
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.

bLu3eYeZ 09-21-2011 04:25

Re: 7 errors one line
 
Thankyou. I had to put (id, 0) I just couldn't understand it. Thankyou very much!

fysiks 09-21-2011 18:08

Re: 7 errors one line
 
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.


All times are GMT -4. The time now is 19:32.

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