Author Topic: Adding a new var for VCE  (Read 473 times)

I'd like to add a variable from an rpg to be compatible with VCE. The variable is %client.rpg.["gold"], and the general 'register special var' in VCE is
Code: [Select]
registerSpecialVar(GameConnection,"bl_id","%this.bl_id");
What would I do to add %client.rpg.["gold"] to VCE?

edit: The problem I'm having is with the " 's in the variable, as in VCE, I'd need to put quotations inside quotations, and still have it execute right. Changing the variable is more than just changing a few lines in the mod.
« Last Edit: September 21, 2012, 06:16:42 PM by --LegoPepper-- »

Code: [Select]
registerSpecialVar(GameConnection,"gold","%this.rpg.[\"gold\"]");

.[stuff here] is not valid syntax mold.


The script executes, but does not work ingame. Plus if I try to display it in centerprint...
Code: [Select]
Syntax error in input.
eval error >> return 17513.rpg.["gold"];
BackTrace: ->[VCE_Main]GameConnection::centerprint->filterVariableString

.[stuff here] is not valid syntax mold.
Owaitwhat
I didn't even look at the stuff before

It's probably .rpg[gold] for real

Owaitwhat
I didn't even look at the stuff before

It's probably .rpg[gold] for real
Works, how would I go about modifying the variable, add/subtract etc?