AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   1 more question (string array) (https://forums.alliedmods.net/showthread.php?t=12587)

BioHazardousWaste 04-18-2005 19:45

1 more question (string array)
 
Seriously, i'm sitting here with tears in my eyes... what the fuck is going on?

ERRORS:
Quote:

/home/groups/amxmodx/tmp/php5IAyKI.sma(7) : error 017: undefined symbol "register_plugin"
/home/groups/amxmodx/tmp/php5IAyKI.sma(16) : error 017: undefined symbol "get_user_authid"
/home/groups/amxmodx/tmp/php5IAyKI.sma(18) : error 017: undefined symbol "vaultdata_exists"
/home/groups/amxmodx/tmp/php5IAyKI.sma(22) : error 017: undefined symbol "LoadAlliance"
/home/groups/amxmodx/tmp/php5IAyKI.sma(23) : error 017: undefined symbol "PLUGIN_HANDLED"
/home/groups/amxmodx/tmp/php5IAyKI.sma(31) : error 017: undefined symbol "vaultdata_exists"
/home/groups/amxmodx/tmp/php5IAyKI.sma(33) : error 017: undefined symbol "get_vaultdata"
/home/groups/amxmodx/tmp/php5IAyKI.sma(33) : warning 215: expression has no effect
/home/groups/amxmodx/tmp/php5IAyKI.sma(33) : error 001: expected token: ";", but found ")"
/home/groups/amxmodx/tmp/php5IAyKI.sma(33) : error 029: invalid expression, assumed zero
/home/groups/amxmodx/tmp/php5IAyKI.sma(33) : fatal error 107: too many error messages on one line
CODE:
Code:
new UserExp[34] new UserAlliance[34] //Initializing Function (main) public plugin_init() {    register_plugin("ma_vault", "1.00", "Steve0") } public SetUpNewUser(id) {     new TotalUsers     new AuthID[34]         //Find new players steam/won id     get_user_authid(id, AuthID, 33)             if(vaultdata_exists(AuthID))//check for existing player     {         //load player data         LoadExp(id)         LoadAlliance(id)         return PLUGIN_HANDLED     }     else     {           //create an entry for new player in each vault         //create new user                 //increase total amount of users by one and add new user number - check for existing first         if (!vaultdata_exists(AuthID))         {             get_vaultdata(Users, TotalUsers)             TotalUsers = TotalUsers + 1             set_vaultdata(Users, TotalUsers)             set_vaultdata(AuthID, TotalUsers)                         //save data for new user             SaveExp(id) //add exp             SaveAlliance(id) //add alliance         }             }     return PLUGIN_HANDLED }         public SaveExp(id) {       //get user AuthID     new key, data     new AuthID[34] key[99]     get_user_authid(id, AuthID, 33)         format(key, 127, "%s_exp", AuthID)     data = str_to_num(PlayerExp[id])     set_vaultdata (key, data) }     public SaveAlliance(id) {     //get user AuthID     new key, data     new AuthID[34]     get_user_authid(id, AuthID, 33)             SetMatrixVault         format(key, 127, "%s_alliance", AuthID)     data = UserAlliance[id]     set_vaultdata (key, data)     } public LoadExp(id) {     //get user AuthID     new AuthID[34], new value[8]     get_user_authid(id, AuthID, 33)             get_vaultdata(AuthID, value, 8)     PlayerExp[id] = str_to_num(value) public LoadAlliance(id) {     //get user AuthID     new AuthID[34], new value[8]     get_user_authid(id, AuthID, 33)         get_vaultdata(AuthID, value, 8)     PlayerAlliance[id] = value }
I'm expecting there to be a few errors, I just finished writing it... but come on - PLUGIN_HANDLED, register_plugin, and get_user_authid are all undefined? what the hell?!?!?!?! :cry: :twisted: :cry:

(note, some of this was copy and pasted out of a working mod, such as the plugin_init.. i changed the name from heal to vault, thats it)

twistedeuphoria 04-18-2005 19:48

You forgot to
Code:
#include <amxmodx> #include <vault>

BioHazardousWaste 04-18-2005 19:52

... :oops: ... that might be important! thanx, was really raging for a bit there :oops: *drops HE nade at feet*

BioHazardousWaste 04-18-2005 19:55

EDIT:

This post has been removed due to stupidity....

twistedeuphoria 04-18-2005 19:58

Edit: This post has been removed due to the removal of the post above due to stupidity.

BioHazardousWaste 04-18-2005 20:05

lol, so reply anyways :P ... i've got it down to this:

get_vaultdata(Users, Value[], 8)
TotalUsers = str_to_num(Value[])

error is this: invalid exprssion, assumed zero

twistedeuphoria 04-18-2005 20:09

Try taking out the brackets.
Code:
str_to_num(Value)

BioHazardousWaste 04-18-2005 20:10

tried that.. invalid expression type

twistedeuphoria 04-18-2005 20:13

You declared Value right?

BioHazardousWaste 04-18-2005 20:17

Yeah.. I got it, sorry... I'm just going to say my brain went on strike for today; i'll try not to post such retarded questions again.


All times are GMT -4. The time now is 10:00.

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