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

Undefined Symbol


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nick
Senior Member
Join Date: Apr 2004
Location: Canada, Alberta, Cal
Old 08-22-2004 , 05:04   Undefined Symbol
Reply With Quote #1

This is what Im working on but having problems.
Code:
   #include <amxmodx>    #include <amxmisc>    #include <fun>     public plugin_init() {     register_plugin("New plugin","1.0","Nicholas Glistak")     return PLUGIN_HANDLED } public plugin_precache() {     precache_model("models/somemodel.mdl")     return PLUGIN_HANDLED } public new_function(id) {     new origin[3]     get_user_origin(id,origin)     model(origin)     spawn(model)     return PLUGIN_HANDLED }
would some like that work anyways?
But how do I define model as somemodel?
__________________
Nick is offline
Send a message via MSN to Nick
johnjg75
Veteran Member
Join Date: Mar 2004
Location: Delaware
Old 08-22-2004 , 05:06  
Reply With Quote #2

what are u tryin 2 do? u could define model as a string cuz the way u put it, its trying to execute it as a function and it isnt defined...
__________________
johnjg75 is offline
Send a message via AIM to johnjg75 Send a message via MSN to johnjg75 Send a message via Yahoo to johnjg75
karlos
Veteran Member
Join Date: Apr 2004
Location: Germany/Poland
Old 08-22-2004 , 11:01  
Reply With Quote #3

try this
Code:
public plugin_precache() {     mymodel = precache_model("models/somemodel.mdl")     return PLUGIN_HANDLED } public new_function(id) {     new origin[3]     get_user_origin(id,origin)     model(origin)     spawn(mymodel)     return PLUGIN_HANDLED }
dont forget to make "new mymodel" a global variable
__________________
alias White Panther
karlos is offline
Nick
Senior Member
Join Date: Apr 2004
Location: Canada, Alberta, Cal
Old 08-22-2004 , 18:39  
Reply With Quote #4

Thanks i will try
__________________
Nick is offline
Send a message via MSN to Nick
Nick
Senior Member
Join Date: Apr 2004
Location: Canada, Alberta, Cal
Old 08-22-2004 , 23:45  
Reply With Quote #5

ok now i have this but getting new errors.
Code:
   #include <amxmodx>    #include <amxmisc>    #include <fun>        new somemodel     public plugin_init() {     register_plugin("new plugin","1.0","Nicholas Glistak")     return PLUGIN_HANDLED } public plugin_precache() {     somemodel = precache_model("models/model.mdl")     return PLUGIN_HANDLED } public new function(id) {     new origin[3]     get_user_origin(id,origin)     somemodel(origin;)     spawn(somemodel)     return PLUGIN_HANDLED }
Im getting these errors now :

Invalid function call, not a valid address
Expression has no effect
Invalid expression, assumed zero

on this line
Code:
somemodel(origin;)
__________________
Nick is offline
Send a message via MSN to Nick
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 08-22-2004 , 23:47  
Reply With Quote #6

Thats not even close to good syntax

Objects dont automatically have stuff..
somemodel(origin) would be calling a function somemodel, with the paramater origin
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull 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 06:03.


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