Arithmetic on globalints in dialog script

Started by trudgian, Thu 05/05/2005 21:02:42

Previous topic - Next topic

trudgian

I am trying to add or subract to a global int within a dialog script, and using the values to determine what message is called to be displayed on a gui.

I cannot seem to get the globalint to change though.
Here is how I am trying to increase the value:


set-globalint(1, GetGlobalInt(1) +1);

This doesn't seem to work. If anyone can point out where' I'm going wrong I would appreciate it.

Ashen

#1
I think the problem is that you can't call GetGlobalInt() directly from dilog scripting. Try using dialog_request and run-script x (which are explained in a couple of posts still on the first page of Beginners Tech, if you don't know how to use them).

EDIT: Actually, it look like they've fallen off the first page, apart from this one, which should still help.
I know what you're thinking ... Don't think that.

trudgian

Thanks dude, shame search function isn't working, woulda found that earlier.

TerranRich

Status: Trying to come up with some ideas...

SMF spam blocked by CleanTalk