AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Tag Mismatch (https://forums.alliedmods.net/showthread.php?t=20080)

Sandurr 11-01-2005 06:13

Tag Mismatch
 
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 Float:origin[3]
origin[0] = float(porigin[0])
origin[1] = float(porigin[1])
origin[2] = float(porigin[2])

entity_set_origin(ambient,origin)

return PLUGIN_HANDLED
}

Hawk552 11-01-2005 07:32

Origins should be ints. You might want to deal with vecs if you want an origin that's a float.

Sandurr 11-01-2005 07:37

so how to fix :p

cause

new porigin[3] =

instead of

new Float:porigin[3] =

would give me 3 new tag mismatches

Hawk552 11-01-2005 07:38

Can you give me the entire source? It's really hard to work with just one function.

Xanimos 11-01-2005 09:48

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.


All times are GMT -4. The time now is 23:59.

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