Raised This Month: $ Target: $400
 0% 

Tag Mismatch


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sandurr
Senior Member
Join Date: Aug 2005
Old 11-01-2005 , 06:13   Tag Mismatch
Reply With Quote #1

new Float:porigin[3] = { 88.0, 412.0, -382.0 }

create_ambient( porigin, "barmusic", "10", "80", 8, "misc/bar.wav" )












This gives a 213 :Tag Mismatch, the line from create_ambient
this could be useful:

public create_ambient(porigin[3],targetname[],vol[],pitch[],spawnflags,file[])
{
new ambient = create_entity("ambient_generic")

if(!ambient) return PLUGIN_HANDLED

entity_set_string(ambient,EV_SZ_classname,"am bient_generic")
entity_set_int(ambient,EV_INT_spawnflags,spaw nflags)
entity_set_float(ambient,EV_FL_health,10.0)
entity_set_string(ambient,EV_SZ_targetname,ta rgetname)
entity_set_string(ambient,EV_SZ_message,file)

DispatchKeyValue(ambient,"pitch",pitch)
DispatchKeyValue(ambient,"volstart",vol)
DispatchKeyValue(ambient,"pitchstart",pitch)
DispatchSpawn(ambient)

new Floatrigin[3]
origin[0] = float(porigin[0])
origin[1] = float(porigin[1])
origin[2] = float(porigin[2])

entity_set_origin(ambient,origin)

return PLUGIN_HANDLED
}
Sandurr is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 11-01-2005 , 07:32  
Reply With Quote #2

Origins should be ints. You might want to deal with vecs if you want an origin that's a float.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Sandurr
Senior Member
Join Date: Aug 2005
Old 11-01-2005 , 07:37  
Reply With Quote #3

so how to fix :p

cause

new porigin[3] =

instead of

new Float:porigin[3] =

would give me 3 new tag mismatches
Sandurr is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 11-01-2005 , 07:38  
Reply With Quote #4

Can you give me the entire source? It's really hard to work with just one function.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 11-01-2005 , 09:48  
Reply With Quote #5

try changing
Code:
public create_ambient(porigin[3],targetname[],vol[],pitch[],spawnflags,file[])
to
Code:
public create_ambient(Float:porigin[3],targetname[],vol[],pitch[],spawnflags,file[])

and that should fix the errors.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
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 23:59.


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