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

How to solve these errors?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
2389736818
Member
Join Date: Jul 2014
Location: China
Old 10-03-2018 , 12:37   How to solve these errors?
Reply With Quote #1

This is the start of the error
compile log:
src/zr/base/configmanager.inc(226):error 130:cannot coerce functions to values
src/zr/base/configmanager.inc(319):warning 219:local variable "result" shadows a variable at a preceding level
src/zr/base/configmanager.inc(406):error 130:cannot coerce functions to values
src/zr/base/configmanager.inc(431):error 130:cannot coerce functions to values

PHP Code:
    // Write the config data to the module data arrays.
    
ConfigMgr_WriteCell(moduleconfigindexConfigData_ReloadFuncGetFunctionByName(GetMyHandle(), configreloadfunc));
    
ConfigMgr_WriteString(moduleconfigindexConfigData_PathCM_DATA_PATHconfigpath); 
I modified code:
PHP Code:
    // Write the config data to the module data arrays.
    
new Function:ConfigMgr_WriteCell GetNativeFunction(moduleconfigindexConfigData_ReloadFuncGetFunctionByName(GetMyHandle(), configreloadfunc));
    
Handle callbackConfigMgr_WriteCell GetFunctionByName(moduleconfigindexConfigData_ReloadFuncGetFunctionByName(GetMyHandle(), configreloadfunc));
    
AddToConfigMgr_WriteCell(callbackConfigMgr_WriteCellbuildcallBack);
    
PushArrayCell(s_TimerDatap_CompleteCallback);
    
ConfigMgr_WriteString(moduleconfigindexConfigData_PathCM_DATA_PATHconfigpath); 
But I still have errors after I am modified.

Later, I deleted ''GetFunctionByName'' and added ''GetFunctionByName''.
PHP Code:
    // Write the config data to the module data arrays.
    
new Function:ConfigMgr_WriteCell GetNativeFunction(moduleconfigindexConfigData_ReloadFunc, (GetMyHandle(), configreloadfunc));
    
Handle callbackConfigMgr_WriteCell ConfigMgr_WriteCell(moduleconfigindexConfigData_ReloadFunc, (GetMyHandle(), configreloadfunc));
    
AddToConfigMgr_WriteCell(callbackConfigMgr_WriteCellbuildcallBack);
    
PushArrayCell(s_TimerDatap_CompleteCallback);
    
ConfigMgr_WriteString(moduleconfigindexConfigData_PathCM_DATA_PATHconfigpath); 
Attached Thumbnails
Click image for larger version

Name:	EQ7APASR_7KMOAJP~K32[`J.png
Views:	28
Size:	5.2 KB
ID:	171666   Click image for larger version

Name:	second error.png
Views:	25
Size:	16.9 KB
ID:	171667   Click image for larger version

Name:	last modify error.png
Views:	29
Size:	13.7 KB
ID:	171668  
__________________

Last edited by 2389736818; 10-03-2018 at 12:39.
2389736818 is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 10-03-2018 , 17:57   Re: How to solve these errors?
Reply With Quote #2

Quote:
Originally Posted by 2389736818 View Post
src/zr/base/configmanager.inc(226):error 130:cannot coerce functions to values
src/zr/base/configmanager.inc(406):error 130:cannot coerce functions to values
src/zr/base/configmanager.inc(431):error 130:cannot coerce functions to values
Use forwards to store a Handle instead of a function reference.

Quote:
Originally Posted by 2389736818 View Post
src/zr/base/configmanager.inc(319):warning 219:local variable "result" shadows a variable at a preceding level
result is already declared before you attempt to redeclare it.
__________________

Last edited by Neuro Toxin; 10-03-2018 at 17:58.
Neuro Toxin 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 05:08.


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