AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Run time error 5: memory access (https://forums.alliedmods.net/showthread.php?t=252828)

ZASTRELIS 12-10-2014 00:25

Run time error 5: memory access
 
Code:
find_ent_by_model(-1, "grenade", "models/tmp/c4tmp.mdl")

Why I get error when got origin of ent?

ZASTRELIS 12-10-2014 05:32

Re: How find C4 model?
 
hmmm, Run time error 5: memory access

Code:
register_logevent("logevent_BombPlanted", 3, "2=Planted_The_Bomb");

Code:
public logevent_BombPlanted() {     new origin, g_point_entuty = find_ent_by_model(-1, "grenade", "models/tmp/c4tmp.mdl")     pev(g_point_entuty, pev_origin, origin)     engfunc(EngFunc_EmitAmbientSound, g_point_entuty, origin, g_szBombSounds[0], 0.5, ATTN_NORM, 0, PITCH_NORM);     g_bPlanted = true; }

Arkshine 12-10-2014 06:15

Re: Run time error 5: memory access
 
pev_origin requires a vector, so it should be: new Float:origin[3]

ZASTRELIS 12-11-2014 21:14

Re: Run time error 5: memory access
 
Quote:

Originally Posted by Arkshine (Post 2233326)
pev_origin requires a vector, so it should be: new Float:origin[3]

Oh! Sorry, it's my inattention =) Thx for re.


All times are GMT -4. The time now is 15:22.

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