AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   FM_GetGameDescription error (https://forums.alliedmods.net/showthread.php?t=82460)

AntiBots 12-23-2008 17:57

FM_GetGameDescription error
 
When i use

PHP Code:

 
register_forward
(FM_GetGameDescription"fw_GetGameDescription")
 
public 
fw_GetGameDescription()
{
        
forward_return(FMV_STRINGg_modname)
        return 
FMRES_SUPERCEDE;


I get this error in my server

Quote:

FATAL ERROR (shutting down): Cache_TryAlloc: 2331792 is greater then free hunk.

anakin_cstrike 12-24-2008 10:31

Re: FM_GetGameDescription error
 
'g_modname' must contain something, like a string.

AntiBots 12-24-2008 10:34

Re: FM_GetGameDescription error
 
Yes

PHP Code:

new const KZ_PLUGIN_VERSION[] = "1.5 Beta"
new g_modname[32]
 
public 
plugins_inits()
formatex(g_modname31"Kz-Arg Mod %s"KZ_PLUGIN_VERSION

I do without a string and i have the same problem

xbatista 12-24-2008 10:59

Re: FM_GetGameDescription error
 
PHP Code:

#define VERSION "1.5 Beta"
new g_modname[32] = "KZ MOD" 

PHP Code:

    format(g_modname31"%s"VERSION


IneedHelp 12-24-2008 11:09

Re: FM_GetGameDescription error
 
AntiBots's version is fine..Why he should put it like that? :/

xbatista 12-24-2008 11:10

Re: FM_GetGameDescription error
 
He says:
Quote:

I do without a string and i have the same problem
VERSION nevermind.
I'm about the problem.
PHP Code:

new g_modname[32] = "KZ MOD"  

    
format(g_modname31


xPaw 12-24-2008 11:12

Re: FM_GetGameDescription error
 
then try
PHP Code:

forward_return(FMV_STRING"KZ-Arg Mod %s"KZ_PLUGIN_VERSION); 

not sure will it work?

ConnorMcLeod 12-24-2008 11:14

Re: FM_GetGameDescription error
 
Quote:

Originally Posted by xPaw (Post 732529)
then try
PHP Code:

forward_return(FMV_STRING"KZ-Arg Mod %s"KZ_PLUGIN_VERSION); 

not sure will it work?

You can't format a string in forward_return native.

AntiBots 12-24-2008 11:40

Re: FM_GetGameDescription error
 
This error is because the update of HLDS?

The server crash only with that forward. If i remove they for perfect.

xbatista 12-24-2008 11:45

Re: FM_GetGameDescription error
 
Example: :}}}
PHP Code:

new g_modname[32] = "KZ MOD- gamename"

public plugin_init()
{
    
format(g_modname31"%s %s"PLUGINVERSION)
    
register_forward(FM_GetGameDescription,        "fw_GameDescription")
}

public 
fw_GetGameDescription()
{
        
forward_return(FMV_STRINGg_modname)
        return 
FMRES_SUPERCEDE;


P.S. It works for me fine.


All times are GMT -4. The time now is 09:08.

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