PDA

View Full Version : I'm Stumbed can anyone help? code/errors below


Shinago
01-04-2012, 12:39
#include <sourcemod>
#include <sdktools>
#include <adminmenu>


//Proplist
new Handle: PropEnable = INVALID_HANDLE;

new string:_sName[512];


public OnPluginStart()
{
/* line 16*/GetEntPropString(entity, Prop_Data, "m_iName", _sName, sizeof(_sName));
/* line 17*/PropEnable = CreateConVar(_sName,1,"Enable Prop");
AutoExecConfig(true,"PropList","configs");
}
:x:x:cry::cry::stupid:

Errors are
(16) : error 017: undefined symbol "entity"
(17) : warning 213: tag mismatch
(17) : error 035: argument type mismatch (argument 2)
(17) : warning 204: symbol is assigned a value that is never used: "PropEnable"

iNexus
01-04-2012, 12:45
why you put GetEntPropString(entity, Prop_Data, "m_iName", _sName, sizeof(_sName)); in Onpluginstart ?

Shinago
01-04-2012, 12:47
why you put GetEntPropString(entity, Prop_Data, "m_iName", _sName, sizeof(_sName)); in Onpluginstart ?
to create a editable cfg file for a mod menu

iNexus
01-04-2012, 12:49
In OnPluginStart is not valide

Shinago
01-04-2012, 12:50
In OnPluginStart is not valide ok any surgestions?

Shinago
01-04-2012, 12:50
ok any surgestions? wat about on map start?

FoxMulder
01-04-2012, 12:53
Can you post more of the code?

Also to make things a bit easier on the eyes use CODE tags


//code goes here

napalm00
01-04-2012, 12:54
wat about on map start?

You should put it in OnMapStart(), but besides that GetEntPropString refers to an entity that isn't declared.
What prop(s) are you looking for?


Also to make things a bit easier on the eyes use CODE tags


//code goes here

Or the PHP ones ^^

Shinago
01-04-2012, 12:58
ok i am trying to make a prop spawn list that i can edit to enable or disable curtain props, (wanting props to shot out from your cross-hair and if they hit a player deal damage as part of a prop war, a one life realism style prop war)

Shinago
01-04-2012, 13:00
ok i am trying to make a prop spawn list that i can edit to enable or disable curtain props, (wanting props to shot out from your cross-hair and if they hit a player deal damage as part of a prop war, a one life realism style prop war) also new to soruce modding but have done c++ database/ user interface before, i can understand others code but when making something new i get confused

Shinago
01-04-2012, 13:28
also new to soruce modding but have done c++ database/ user interface before, i can understand others code but when making something new i get confused their ain't any prop spawning mods so this is why i ain't trying to edit someones