Raised This Month: $ Target: $400
 0% 

Solved invalid function or declaration


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
man_s_our
Senior Member
Join Date: Jul 2017
Location: aim_taliban
Old 04-01-2018 , 11:14   invalid function or declaration
Reply With Quote #1

why does this part of code give me that error?
PHP Code:
new bullspeed[33]
new 
bullweight[33]
bullspeed[CSW_P228] = 1400;
bullweight[CSW_P228] = 8;
bullspeed[CSW_SCOUT] = 2800;
bullweight[CSW_SCOUT] = 

Last edited by man_s_our; 04-01-2018 at 14:11.
man_s_our is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 04-01-2018 , 11:36   Re: invalid function or declaration
Reply With Quote #2

Which line exactly? And please post the full compiler output.
__________________
klippy is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-01-2018 , 11:51   Re: invalid function or declaration
Reply With Quote #3

What you post compiles for me. Is the code when compiling or in game?
Code:
AMX Mod X Compiler 1.8.3-dev+4748
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team

Header size:            176 bytes
Code size:              292 bytes
Data size:              104 bytes
Stack/heap size:      16384 bytes
Total requirements:   16956 bytes
Done.
__________________
Bugsy is offline
man_s_our
Senior Member
Join Date: Jul 2017
Location: aim_taliban
Old 04-01-2018 , 12:46   Re: invalid function or declaration
Reply With Quote #4

Quote:
Originally Posted by KliPPy View Post
Which line exactly? And please post the full compiler output.
bullspeed[CSW_P228] = 1400;
and the lines after it
man_s_our is offline
man_s_our
Senior Member
Join Date: Jul 2017
Location: aim_taliban
Old 04-01-2018 , 12:47   Re: invalid function or declaration
Reply With Quote #5

Quote:
//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// RBT.sma
// C:\Counter-Strike\cstrike\addons\amxmodx\scripting\RBT.s ma(25) : error 010: invalid function or declaration
//
// 1 Error.
// Could not locate output file C:\Counter-Strike\cstrike\addons\amxmodx\scripting\compi led\RBT.amx (compile failed).
//
// Compilation Time: 0,25 sec
// ----------------------------------------

// File not found.

Press enter to exit ...
the same on the web compiler

Last edited by man_s_our; 04-01-2018 at 12:47.
man_s_our is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 04-01-2018 , 13:04   Re: invalid function or declaration
Reply With Quote #6

You should post more code, that code alone is correct.
__________________
klippy is offline
man_s_our
Senior Member
Join Date: Jul 2017
Location: aim_taliban
Old 04-01-2018 , 13:09   Re: invalid function or declaration
Reply With Quote #7

Quote:
Originally Posted by KliPPy View Post
You should post more code, that code alone is correct.
Attached Files
File Type: sma Get Plugin or Get Source (rbt.sma - 206 views - 11.7 KB)
man_s_our is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-01-2018 , 13:38   Re: invalid function or declaration
Reply With Quote #8

Yes I've seen false errors reported by the compiler. The actual bad line is elsewhere, you need to review every line.
__________________
Bugsy is offline
man_s_our
Senior Member
Join Date: Jul 2017
Location: aim_taliban
Old 04-01-2018 , 14:07   Re: invalid function or declaration
Reply With Quote #9

Finally, succesfully compiled after moving those lines to plugin_init
man_s_our is offline
man_s_our
Senior Member
Join Date: Jul 2017
Location: aim_taliban
Old 04-01-2018 , 14:13   Re: invalid function or declaration
Reply With Quote #10

from this experment and others I found out that if the problem were realy in the headers the error line will be the total code lines.
man_s_our 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 02:08.


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