AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   get_user_weapons help (https://forums.alliedmods.net/showthread.php?t=5468)

Timmi the savage 09-02-2004 18:54

get_user_weapons help
 
Hi,
I need help on this too
ok i allways seem to get a run time error: 10
Ive tried several thing.
This works but it gives me the error and eventually crashes

Code:
public weapons(id) {     wpnid1[id]=0     get_user_weapons(id, wpnid[id],wpnid1[id]) return PLUGIN_CONTINUE }

Timmi the savage 09-02-2004 18:55

Code:
#include <amxmodx> #include <amxmisc> #include <string> #include <engine> #include <fun> #include <cstrike> ---------------------------------------- new wpnid1[33] = 0 new wpnid[33][32]

Timmi the savage 09-03-2004 01:27

Nevermind. I fixed it.....
SQUASHED the crashes. niiiice
For those who are wondering........

The code above wont work because ......................

The arguments for read_data 1 conflict with get_user_weapons when used in the same block as identifiers.(this was the way i was using it to start with wich worked but caused errors.)

heres the code

Timmi the savage 09-03-2004 01:32

Code:
public weapons(id) {   if(id==0)//Dont want id 0(server) to use this. I needed to add this other wise i still had an error.   return PLUGIN_CONTINUE   get_user_weapons(id, wpnid[id],wpnid1[id])   for (new i=0; (i < wpnid1[id]) && (i < 32); ++i) { //everything under this is specific to the mod im working on.     if (quest[id]==3) {       if (wpnid[id][i]==16) {       kills[id]=kills[id]+1       set_hudmessage(250,250,100,1.0,0.01,0,6.0,2.0,0.1,0.5,HMCHAN_GENERAL)       show_hudmessage(id, "Kills with usp %d/4", kills[id])       }     }   } return PLUGIN_CONTINUE }


All times are GMT -4. The time now is 17:14.

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