Home   Help Search Login Register  

Author Topic: Scripts work, but still receive Error: invalid number  (Read 1565 times)

0 Members and 1 Guest are viewing this topic.

Offline Clayborne

  • Members
  • *

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.

Offline RKurtzDmitriyev

  • Former Staff
  • ****
Re: Scripts work, but still receive Error: invalid number
« Reply #1 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:
The OFP Editing Center wishes to remind you that the faithful COMREF will never threaten to stab you and, in fact, cannot speak.
However, in the event that it does speak, you are encouraged to heed its advice. ;)

Offline Clayborne

  • Members
  • *
Re: Scripts work, but still receive Error: invalid number
« Reply #2 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.   

Offline RKurtzDmitriyev

  • Former Staff
  • ****
Re: Scripts work, but still receive Error: invalid number
« Reply #3 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.
The OFP Editing Center wishes to remind you that the faithful COMREF will never threaten to stab you and, in fact, cannot speak.
However, in the event that it does speak, you are encouraged to heed its advice. ;)

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Scripts work, but still receive Error: invalid number
« Reply #4 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.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Scripts work, but still receive Error: invalid number
« Reply #5 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:
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Clayborne

  • Members
  • *
Re: Scripts work, but still receive Error: invalid number
« Reply #6 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!)
« Last Edit: 29 Apr 2010, 12:04:01 by Clayborne »

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Scripts work, but still receive Error: invalid number
« Reply #7 on: 29 Apr 2010, 12:52:21 »
Works fine here, and the file itself is OK..
(I'm running Win7)
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Scripts work, but still receive Error: invalid number
« Reply #8 on: 29 Apr 2010, 15:43:17 »
I also have vista and it works fine for me. The properties were fine too.