AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   I'm Stumbed can anyone help? code/errors below (https://forums.alliedmods.net/showthread.php?t=175463)

Shinago 01-04-2012 12:39

I'm Stumbed can anyone help? code/errors below
 
#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

Re: I'm Stumbed can anyone help? code/errors below
 
why you put GetEntPropString(entity, Prop_Data, "m_iName", _sName, sizeof(_sName)); in Onpluginstart ?

Shinago 01-04-2012 12:47

Re: I'm Stumbed can anyone help? code/errors below
 
Quote:

Originally Posted by iNexus (Post 1625299)
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

Re: I'm Stumbed can anyone help? code/errors below
 
In OnPluginStart is not valide

Shinago 01-04-2012 12:50

Re: I'm Stumbed can anyone help? code/errors below
 
Quote:

Originally Posted by iNexus (Post 1625302)
In OnPluginStart is not valide

ok any surgestions?

Shinago 01-04-2012 12:50

Re: I'm Stumbed can anyone help? code/errors below
 
Quote:

Originally Posted by Shinago (Post 1625304)
ok any surgestions?

wat about on map start?

FoxMulder 01-04-2012 12:53

Re: I'm Stumbed can anyone help? code/errors below
 
Can you post more of the code?

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

Code:

//code goes here

napalm00 01-04-2012 12:54

Re: I'm Stumbed can anyone help? code/errors below
 
Quote:

Originally Posted by Shinago (Post 1625305)
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?

Quote:

Originally Posted by FoxMulder (Post 1625309)
Also to make things a bit easier on the eyes use CODE tags

Code:

//code goes here

PHP Code:

Or the PHP ones ^^ 


Shinago 01-04-2012 12:58

Re: I'm Stumbed can anyone help? code/errors below
 
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

Re: I'm Stumbed can anyone help? code/errors below
 
Quote:

Originally Posted by Shinago (Post 1625317)
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


All times are GMT -4. The time now is 12:55.

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