OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Clayborne on 28 Apr 2010, 20:41:17

Title: Scripts work, but still receive Error: invalid number
Post by: Clayborne on 28 Apr 2010, 20:41:17

Recently, out of the blue, any time I execute a script, I get the following error

Code: [Select]
|#|ï>>¿ error invalid number
Even the simplest script like

Code: [Select]
~1
hint "hint"
exit

The error always seems to be the first line. It started happening when I used Mando's 3D Write script, but occurs with all new scripts I create. I tried running the game without any addons and it still happens (I didn't think that would help but I tried it anyway).

The scripts work fine, it's just an annoying error.
Title: Re: Scripts work, but still receive Error: invalid number
Post by: RKurtzDmitriyev on 28 Apr 2010, 21:39:44
That doesn't sound good.

Do you get this problem when scripts not made by you are run?

If no one else responds with a better idea, I can only recommend reinstalling OFP. :dunno:
Title: Re: Scripts work, but still receive Error: invalid number
Post by: Clayborne on 28 Apr 2010, 23:13:43
If I run a script that was made or downloaded before the problem started, it runs without the error. As I said, the problem started right after I started using Mando3DWrite, so it's not just my own scripts (I'm not saying Mando's script caused it, that's just when it started happening).

I'm starting to think it's just that Vista doesn't like OFP very much. I had a problem a few months ago where Vista would not allow me to save changes to scripts, description files etc, in Flashpoint mission folders. The permissions would be automatically altered, and it would not allow me to change them, despite being an administrator. I had to cut/paste scripts to desktop, alter them there, then paste them back into the folder. That problem seemed to fix itself though.

ALSO, I've been having another problem with the ground textures being corrupted or something. I'll be in-game, and suddenly the whole ground texture will turn black with white markings, the most recent one being black with the word 'Policie' from a nearby police car suddenly tiled all over the landscape. I used to to think it was just on user-made maps, but it happens on stock islands as well.

I think maybe I'll have to take Flashpoint out to the woodshed and shoot it.   
Title: Re: Scripts work, but still receive Error: invalid number
Post by: RKurtzDmitriyev on 29 Apr 2010, 01:30:52
Apologies, it seems I didn't read your post fully.

Quote
I think maybe I'll have to take Flashpoint out to the woodshed and shoot it.

I don't think that will work. Vista is truly the iron-willed operating system. Even threats of physical violence will not persuade it to function properly.
Title: Re: Scripts work, but still receive Error: invalid number
Post by: savedbygrace on 29 Apr 2010, 04:24:31
The black and white deal could perhaps be your video card?

Vista is not the problem I don't think.

Could you attach a script that does this so that we can check the formatting, code and even attempt to run it on our own computers. It could be something not OFP related.

Sorry you're having such sour luck.
Title: Re: Scripts work, but still receive Error: invalid number
Post by: h- on 29 Apr 2010, 08:41:25
One thing could be that for some reason or another you are actually using .rtf file for the script file which will have some odd symbols'n'stuff in it when turned to plain text (which the script are read as) :dunno:
Title: Re: Scripts work, but still receive Error: invalid number
Post by: Clayborne on 29 Apr 2010, 11:24:17
Yeah I don't think OFP is causing the script problem. I think Vista has somehow changed the properties of sqs files or something. Anyway, here's a script.

In the mission it's just executed with an Anybody Not Present trigger.

EDIT

I just found that the scripts that produce the error may have been 'blocked' by Vista. In the properties it said "This file came from another computer and might be blocked to help protect this computer". I unblocked them but the error still occurs.

EDIT 2

I copied a 'working' script (one written before the problem started) into the folder and pasted in the contents of one of the broken scripts, and this runs without error. I did actually try this before but it didn't work. I guess this negates the problem for now, but it would be interesting to see if any of you guys can run that attached script without error.

(Note: BURN IT AND BURY IT AFTERWARDS!)
Title: Re: Scripts work, but still receive Error: invalid number
Post by: h- on 29 Apr 2010, 12:52:21
Works fine here, and the file itself is OK..
(I'm running Win7)
Title: Re: Scripts work, but still receive Error: invalid number
Post by: savedbygrace on 29 Apr 2010, 15:43:17
I also have vista and it works fine for me. The properties were fine too.