AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Insufficaint Memeory ? [SOLVED] (https://forums.alliedmods.net/showthread.php?t=48370)

The Specialist 12-10-2006 15:59

Insufficaint Memeory ? [SOLVED]
 
:cry: Ive never seen this error before. But I'm getting an error for "insufficient memory" has any one ever had this before?

mateo10 12-10-2006 16:02

Re: Insufficaint Memeory ?
 
Have you checked your HD space?

The Specialist 12-10-2006 16:04

Re: Insufficaint Memeory ?
 
i don't think it is that because other plugins still compile. Only this one doesn't :cry:

Hawk552 12-10-2006 16:09

Re: Insufficaint Memeory ?
 
Quote:

Originally Posted by The Specialist (Post 413502)
:cry: Ive never seen this error before. But I'm getting an error for "insufficient memory" has any one ever had this before?

Use this somewhere in your script:

Code:
#pragma dynamic 32768

The Specialist 12-10-2006 16:11

Re: Insufficaint Memeory ?
 
So i get an error on the line where i use pev to get the origin :cry:

Code:
#pragma dynamic 32768 #include <amxmodx> #include <amxmisc> #include <fakemeta> #include <sockets> new g_Switch; new g_TransportAccess; new filename[256]; /*------------------------------------------------------------------------------------------------*/ enum ORIGIN_DATA {  ADMIN_ID[32],  MAP_NAME[32],  ORIGIN[3],    END_DATA } new MSP_Data[33][ORIGIN_DATA]; /*------------------------------------------------------------------------------------------------*/ public plugin_init() {  register_plugin("Multi-Server Portal","0.1","The Specialist");  g_Switch = register_cvar("msp_switch","1");  g_TransportAccess = register_cvar("msp_jump_access","0");  get_configsdir(filename,255);  format(filename,255,"%s/msp_origins.txt",filename);  register_concmd("msp_create_jump","create_jump_point",ADMIN_LEVEL_A,"Creates An Origin For Portal Where Admin Is");  register_concmd("msp_add_server","add_server",ADMIN_LEVEL_A,"Adds A Server To The List By IP"); } /*------------------------------------------------------------------------------------------------*/ public create_jump_point(id,level,cid) {  if((cmd_access(id , level , cid , 0) &&( get_pcvar_num(g_Switch))  {   pev(id,pev_origin,MSP_Data[id][ORIGIN]);   get_mapname(MSP_Data[id][MAP_NAME],31);   get_user_authid(id,MSP_Data[id][ADMIN_ID],31);     new FP = fopen(filename,"a+");     if( FP)   {    fwrite_raw(FP,MSP_Data[id][ORIGIN_DATA: 0],sizeof(MSP_Data[]),BLOCK_INT)    return;   }  }  fclose(AP);  return 1; }

stupok 12-10-2006 16:38

Re: Insufficaint Memeory ?
 
new FP = fopen(...)
fclose(AP)

The Specialist 12-10-2006 16:40

Re: Insufficaint Memeory ?
 
good catch , but that still gives an error . :cry:

XxAvalanchexX 12-10-2006 17:00

Re: Insufficaint Memeory ?
 
Code:
enum ORIGIN_DATA {  ADMIN_ID[32],  MAP_NAME[32],  ORIGIN[3],    END_DATA } new MSP_Data[33][ORIGIN_DATA];

You can't really do that...

The Specialist 12-10-2006 17:02

Re: Insufficaint Memeory ?
 
why cant you do that ? I got the file writing part from a tutorial .

Hawk552 12-10-2006 17:06

Re: Insufficaint Memeory ?
 
Quote:

Originally Posted by The Specialist (Post 413561)
why cant you do that ? I got the file writing part from a tutorial .

Don't use enums as structs. They're totally broken.

Just use seperate variables.


All times are GMT -4. The time now is 06:56.

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